public class FtpServerFactory extends Object
| Constructor and Description |
|---|
FtpServerFactory()
Creates a server with the default configuration
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(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
|
org.apache.ftpserver.ftplet.FileSystemFactory |
getFileSystem()
Retrieve the file system used by servers created by this factory
|
Map<String,org.apache.ftpserver.ftplet.Ftplet> |
getFtplets()
Get all
Ftplets registered by servers created by this factory |
Listener |
getListener(String name)
Get a specific
Listener identified by its name |
Map<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
|
org.apache.ftpserver.ftplet.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(org.apache.ftpserver.ftplet.FileSystemFactory fileSystem)
Set the file system to be used by servers created by this factory
|
void |
setFtplets(Map<String,org.apache.ftpserver.ftplet.Ftplet> ftplets)
Set the
Ftplets to be active by servers created by this factory. |
void |
setListeners(Map<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(org.apache.ftpserver.ftplet.UserManager userManager)
Set the user manager to be used by servers created by this factory
|
public FtpServerFactory()
public FtpServer createServer()
DefaultFtpServer instance based
on the provided configurationDefaultFtpServer instancepublic Map<String,Listener> getListeners()
public Listener getListener(String name)
Listener identified by its namename - The name of the listenerListener matching the provided namepublic void addListener(String name, Listener listener)
Listener to this factoryname - The name of the listenerlistener - The Listenerpublic void setListeners(Map<String,Listener> listeners)
listeners - The listeners to use for this server with the name as the key
and the listener as the valueIllegalStateException - If a custom server context has been setpublic Map<String,org.apache.ftpserver.ftplet.Ftplet> getFtplets()
Ftplets registered by servers created by this factoryFtpletspublic void setFtplets(Map<String,org.apache.ftpserver.ftplet.Ftplet> ftplets)
Ftplets to be active by servers created by this factory. Replaces existing
Ftpletsftplets - 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.IllegalStateException - If a custom server context has been setpublic org.apache.ftpserver.ftplet.UserManager getUserManager()
public void setUserManager(org.apache.ftpserver.ftplet.UserManager userManager)
userManager - The UserManagerIllegalStateException - If a custom server context has been setpublic org.apache.ftpserver.ftplet.FileSystemFactory getFileSystem()
FileSystemFactorypublic void setFileSystem(org.apache.ftpserver.ftplet.FileSystemFactory fileSystem)
fileSystem - The FileSystemFactoryIllegalStateException - If a custom server context has been setpublic CommandFactory getCommandFactory()
CommandFactorypublic void setCommandFactory(CommandFactory commandFactory)
commandFactory - The CommandFactoryIllegalStateException - If a custom server context has been setpublic MessageResource getMessageResource()
MessageResourcepublic void setMessageResource(MessageResource messageResource)
messageResource - The MessageResourceIllegalStateException - If a custom server context has been setpublic ConnectionConfig getConnectionConfig()
MessageResourcepublic void setConnectionConfig(ConnectionConfig connectionConfig)
connectionConfig - The ConnectionConfig to be used
by servers created by this factoryCopyright © 2003–2017 The Apache Software Foundation. All rights reserved.