Package org.alfresco.filesys
Class FTPServerBean
- java.lang.Object
-
- org.springframework.extensions.surf.util.AbstractLifecycleBean
-
- org.alfresco.filesys.FTPServerBean
-
- All Implemented Interfaces:
java.util.EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class FTPServerBean extends org.springframework.extensions.surf.util.AbstractLifecycleBeanFTP Server ClassCreate and start the server components required to run the FTP server.
- Author:
- GKSpencer
-
-
Constructor Summary
Constructors Constructor Description FTPServerBean(org.alfresco.jlan.server.config.ServerConfiguration serverConfig)Class constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.alfresco.jlan.server.config.ServerConfigurationgetConfiguration()Return the server configurationbooleanisStarted()static voidmain(java.lang.String[] args)Runs the FTP server directlyprotected voidonBootstrap(org.springframework.context.ApplicationEvent event)protected voidonShutdown(org.springframework.context.ApplicationEvent event)voidstartServer()Start the FTP server componentsvoidstopServer()Stop the FTP server components
-
-
-
Method Detail
-
getConfiguration
public final org.alfresco.jlan.server.config.ServerConfiguration getConfiguration()
Return the server configuration- Returns:
- ServerConfiguration
-
isStarted
public boolean isStarted()
- Returns:
- Returns true if the server started up without any errors
-
startServer
public final void startServer() throws java.net.SocketException, java.io.IOExceptionStart the FTP server components- Throws:
java.net.SocketException- If a network error occursjava.io.IOException- If an I/O error occurs
-
stopServer
public final void stopServer()
Stop the FTP server components
-
main
public static void main(java.lang.String[] args)
Runs the FTP server directly- Parameters:
args- String[]
-
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
- Specified by:
onBootstrapin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event)
- Specified by:
onShutdownin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
-