org.apache.ftpserver.impl
Class DefaultFtpServerContext

java.lang.Object
  extended by org.apache.ftpserver.impl.DefaultFtpServerContext
All Implemented Interfaces:
FtpletContext, FtpServerContext

public class DefaultFtpServerContext
extends Object
implements FtpServerContext

Internal class, do not use directly. FTP server configuration implementation. It holds all the components used.

Author:
Apache MINA Project

Constructor Summary
DefaultFtpServerContext()
           
 
Method Summary
 void addListener(String name, Listener listener)
           
 void createDefaultUsers()
          Create default users.
 void dispose()
          Close all the components.
 CommandFactory getCommandFactory()
          Get the command factory.
 ConnectionConfig getConnectionConfig()
           
 FileSystemFactory getFileSystemManager()
          Get file system manager.
 Ftplet getFtplet(String name)
          Get Ftplet.
 FtpletContainer getFtpletContainer()
          Get ftplet handler.
 FtpStatistics getFtpStatistics()
          Get ftp statistics.
 Listener getListener(String name)
           
 Map<String,Listener> getListeners()
           
 MessageResource getMessageResource()
          Get message resource.
 ThreadPoolExecutor getThreadPoolExecutor()
          Returns the thread pool executor for this context.
 UserManager getUserManager()
          Get user manager.
 Listener removeListener(String name)
           
 void setCommandFactory(CommandFactory commandFactory)
           
 void setConnectionConfig(ConnectionConfig connectionConfig)
           
 void setFileSystemManager(FileSystemFactory fileSystemManager)
           
 void setFtpletContainer(FtpletContainer ftpletContainer)
           
 void setFtpStatistics(FtpStatistics statistics)
           
 void setListener(String name, Listener listener)
           
 void setListeners(Map<String,Listener> listeners)
           
 void setMessageResource(MessageResource messageResource)
           
 void setUserManager(UserManager userManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFtpServerContext

public DefaultFtpServerContext()
Method Detail

createDefaultUsers

public void createDefaultUsers()
                        throws Exception
Create default users.

Throws:
Exception

getUserManager

public UserManager getUserManager()
Get user manager.

Specified by:
getUserManager in interface FtpletContext
Returns:
The UserManager

getFileSystemManager

public FileSystemFactory getFileSystemManager()
Get file system manager.

Specified by:
getFileSystemManager in interface FtpletContext
Returns:
The FileSystemFactory

getMessageResource

public MessageResource getMessageResource()
Get message resource.

Specified by:
getMessageResource in interface FtpServerContext

getFtpStatistics

public FtpStatistics getFtpStatistics()
Get ftp statistics.

Specified by:
getFtpStatistics in interface FtpletContext
Returns:
The FtpStatistics

setFtpStatistics

public void setFtpStatistics(FtpStatistics statistics)

getFtpletContainer

public FtpletContainer getFtpletContainer()
Get ftplet handler.

Specified by:
getFtpletContainer in interface FtpServerContext

getCommandFactory

public CommandFactory getCommandFactory()
Get the command factory.

Specified by:
getCommandFactory in interface FtpServerContext

getFtplet

public Ftplet getFtplet(String name)
Get Ftplet.

Specified by:
getFtplet in interface FtpletContext
Parameters:
name - The name identifying the Ftplet
Returns:
The Ftplet registred with the provided name, or null if none exists

dispose

public void dispose()
Close all the components.

Specified by:
dispose in interface FtpServerContext

getListener

public Listener getListener(String name)
Specified by:
getListener in interface FtpServerContext

setListener

public void setListener(String name,
                        Listener listener)

getListeners

public Map<String,Listener> getListeners()
Specified by:
getListeners in interface FtpServerContext

setListeners

public void setListeners(Map<String,Listener> listeners)

addListener

public void addListener(String name,
                        Listener listener)

removeListener

public Listener removeListener(String name)

setCommandFactory

public void setCommandFactory(CommandFactory commandFactory)

setFileSystemManager

public void setFileSystemManager(FileSystemFactory fileSystemManager)

setFtpletContainer

public void setFtpletContainer(FtpletContainer ftpletContainer)

setMessageResource

public void setMessageResource(MessageResource messageResource)

setUserManager

public void setUserManager(UserManager userManager)

getConnectionConfig

public ConnectionConfig getConnectionConfig()
Specified by:
getConnectionConfig in interface FtpServerContext

setConnectionConfig

public void setConnectionConfig(ConnectionConfig connectionConfig)

getThreadPoolExecutor

public ThreadPoolExecutor getThreadPoolExecutor()
Description copied from interface: FtpServerContext
Returns the thread pool executor for this context.

Specified by:
getThreadPoolExecutor in interface FtpServerContext
Returns:
the thread pool executor for this context.


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.