org.apache.ftpserver.ftplet
Interface FtpletContainer

All Superinterfaces:
Ftplet
All Known Implementing Classes:
DefaultFtpletContainer

public interface FtpletContainer
extends Ftplet

Interface describing an Ftplet container. Ftplet containers extend the Ftplet interface and forward any events to the Ftplets hosted by the container.


Method Summary
 void addFtplet(java.lang.String name, Ftplet ftplet)
          Add an Ftplet to the container.
 Ftplet getFtplet(java.lang.String name)
          Retrive the Ftplet identified by the name (as provided in the addFtplet(String, Ftplet) method.
 java.util.Map<java.lang.String,Ftplet> getFtplets()
          Retrive all Ftplets registered with this container
 Ftplet removeFtplet(java.lang.String name)
          Remove the Ftplet identified by the name (as provided in the addFtplet(String, Ftplet) method.
 void setFtplets(java.util.Map<java.lang.String,Ftplet> ftplets)
          Set the Ftplets for this container.
 
Methods inherited from interface org.apache.ftpserver.ftplet.Ftplet
destroy, init, onAppendEnd, onAppendStart, onConnect, onDeleteEnd, onDeleteStart, onDisconnect, onDownloadEnd, onDownloadStart, onLogin, onMkdirEnd, onMkdirStart, onRenameEnd, onRenameStart, onRmdirEnd, onRmdirStart, onSite, onUploadEnd, onUploadStart, onUploadUniqueEnd, onUploadUniqueStart
 

Method Detail

addFtplet

void addFtplet(java.lang.String name,
               Ftplet ftplet)
Add an Ftplet to the container.

Parameters:
name - The name of the Ftplet to be added
ftplet - The Ftplet
Throws:
java.lang.IllegalArgumentException - If an Ftplet with the same name already exist within the container

removeFtplet

Ftplet removeFtplet(java.lang.String name)
Remove the Ftplet identified by the name (as provided in the addFtplet(String, Ftplet) method.

Parameters:
name - The name of the Ftplet to be removed
Returns:
The removed Ftplet if found, or null if the name is unknown to the container.

getFtplet

Ftplet getFtplet(java.lang.String name)
Retrive the Ftplet identified by the name (as provided in the addFtplet(String, Ftplet) method.

Parameters:
name - The name of the Ftplet to retrive
Returns:
The Ftplet if found, or null if the name is unknown to the container.

getFtplets

java.util.Map<java.lang.String,Ftplet> getFtplets()
Retrive all Ftplets registered with this container

Returns:
A map of all Ftplets with their name as the key

setFtplets

void setFtplets(java.util.Map<java.lang.String,Ftplet> ftplets)
Set the Ftplets for this container. Will remove all previously registred Ftplets in this container

Parameters:
ftplets - A map of all Ftplets with their name as the key


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.