|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ftpserver.FtpServerFactory
public class FtpServerFactory
This is the starting point of all the servers. Creates server instances based on the provided configuration.
Constructor Summary | |
---|---|
FtpServerFactory()
Creates a server with the default configuration |
Method Summary | |
---|---|
void |
addListener(java.lang.String name,
Listener listener)
Add a Listener to this factory |
FtpServer |
createServer()
Create a DefaultFtpServer instance based
on the provided configuration |
CommandFactory |
getCommandFactory()
Retrieve the command factory used by servers created by this factory |
ConnectionConfig |
getConnectionConfig()
Retrieve the connection configuration this server |
FileSystemFactory |
getFileSystem()
Retrieve the file system used by servers created by this factory |
java.util.Map<java.lang.String,Ftplet> |
getFtplets()
Get all Ftplet s registered by servers created by this factory |
Listener |
getListener(java.lang.String name)
Get a specific Listener identified by its name |
java.util.Map<java.lang.String,Listener> |
getListeners()
Get all listeners available on servers created by this factory |
MessageResource |
getMessageResource()
Retrieve the message resource used by servers created by this factory |
UserManager |
getUserManager()
Retrieve the user manager used by servers created by this factory |
void |
setCommandFactory(CommandFactory commandFactory)
Set the command factory to be used by servers created by this factory |
void |
setConnectionConfig(ConnectionConfig connectionConfig)
Set the message resource to be used with this server |
void |
setFileSystem(FileSystemFactory fileSystem)
Set the file system to be used by servers created by this factory |
void |
setFtplets(java.util.Map<java.lang.String,Ftplet> ftplets)
Set the Ftplet s to be active by servers created by this factory. |
void |
setListeners(java.util.Map<java.lang.String,Listener> listeners)
Set the listeners for servers created by this factory, replaces existing listeners |
void |
setMessageResource(MessageResource messageResource)
Set the message resource to be used with by servers created by this factory |
void |
setUserManager(UserManager userManager)
Set the user manager to be used by servers created by this factory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FtpServerFactory()
java.lang.Exception
Method Detail |
---|
public FtpServer createServer()
DefaultFtpServer
instance based
on the provided configuration
DefaultFtpServer
instancepublic java.util.Map<java.lang.String,Listener> getListeners()
public Listener getListener(java.lang.String name)
Listener
identified by its name
name
- The name of the listener
Listener
matching the provided namepublic void addListener(java.lang.String name, Listener listener)
Listener
to this factory
name
- The name of the listenerlistener
- The Listener
public void setListeners(java.util.Map<java.lang.String,Listener> listeners)
listeners
- The listeners to use for this server with the name as the key
and the listener as the value
java.lang.IllegalStateException
- If a custom server context has been setpublic java.util.Map<java.lang.String,Ftplet> getFtplets()
Ftplet
s registered by servers created by this factory
Ftplet
spublic void setFtplets(java.util.Map<java.lang.String,Ftplet> ftplets)
Ftplet
s to be active by servers created by this factory. Replaces existing
Ftplet
s
ftplets
- Ftplets as a map with the name as the key and the Ftplet as
the value. The Ftplet container will iterate over the map in the
order provided by the Map. If invocation order of Ftplets is of importance,
make sure to provide a ordered Map, for example LinkedHashMap
.
java.lang.IllegalStateException
- If a custom server context has been setpublic UserManager getUserManager()
public void setUserManager(UserManager userManager)
userManager
- The UserManager
java.lang.IllegalStateException
- If a custom server context has been setpublic FileSystemFactory getFileSystem()
FileSystemFactory
public void setFileSystem(FileSystemFactory fileSystem)
fileSystem
- The FileSystemFactory
java.lang.IllegalStateException
- If a custom server context has been setpublic CommandFactory getCommandFactory()
CommandFactory
public void setCommandFactory(CommandFactory commandFactory)
commandFactory
- The CommandFactory
java.lang.IllegalStateException
- If a custom server context has been setpublic MessageResource getMessageResource()
MessageResource
public void setMessageResource(MessageResource messageResource)
messageResource
- The MessageResource
java.lang.IllegalStateException
- If a custom server context has been setpublic ConnectionConfig getConnectionConfig()
MessageResource
public void setConnectionConfig(ConnectionConfig connectionConfig)
connectionConfig
- The ConnectionConfig
to be used
by servers created by this factorymessageResource
- The MessageResource
java.lang.IllegalStateException
- If a custom server context has been set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |