Package org.alfresco.filesys
Class FTPServerBean
java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
org.alfresco.filesys.FTPServerBean
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class FTPServerBean
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
FTP Server Class
Create and start the server components required to run the FTP server.
- Author:
- GKSpencer
-
Field Summary
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log -
Constructor Summary
ConstructorsConstructorDescriptionFTPServerBean(org.alfresco.jlan.server.config.ServerConfiguration serverConfig) Class constructor -
Method Summary
Modifier and TypeMethodDescriptionfinal org.alfresco.jlan.server.config.ServerConfigurationReturn the server configurationbooleanstatic voidRuns the FTP server directlyprotected voidonBootstrap(org.springframework.context.ApplicationEvent event) protected voidonShutdown(org.springframework.context.ApplicationEvent event) final voidStart the FTP server componentsfinal voidStop the FTP server componentsMethods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent, setApplicationContext
-
Constructor Details
-
FTPServerBean
public FTPServerBean(org.alfresco.jlan.server.config.ServerConfiguration serverConfig) Class constructor- Parameters:
serverConfig- ServerConfiguration
-
-
Method Details
-
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
Start the FTP server components- Throws:
SocketException- If a network error occursIOException- If an I/O error occurs
-
stopServer
public final void stopServer()Stop the FTP server components -
main
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
-