|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.hermesftp.utils.AbstractAppAwareBean
net.sf.hermesftp.server.AbstractFtpServer
public abstract class AbstractFtpServer
Ancestor class for FTP server implementations.
| Field Summary |
|---|
| Fields inherited from interface net.sf.hermesftp.common.BeanConstants |
|---|
BEAN_CONSOLE, BEAN_SERVER, BEAN_SESSION, BEAN_SSL_SERVER |
| Constructor Summary | |
|---|---|
AbstractFtpServer()
|
|
| Method Summary | |
|---|---|
void |
abort()
Halts the server. |
void |
addFtpEventListener(FtpEventListener lstnr)
Adds an external listerner that wants to get informed about FTP events. |
void |
cleanUpSessions()
Removes closed sessions from memory. |
protected abstract FtpSessionContext |
createFtpContext()
Creates the context object passed to the user session. |
protected abstract java.net.ServerSocket |
createServerSocket()
Creates a server socket. |
void |
downloadPerformed(java.lang.String clientId,
java.io.File file)
The event is called after a file has been downloaded by a client. |
int |
getConnectionCount()
Getter method for the java bean connectionCount. |
int |
getConnectionCountHWMark()
Maximum number of connections since server started. |
java.util.Date |
getConnectionCountHWMarkDate()
Date when number of connections reached its maximum. |
java.lang.String |
getName()
Returns the name of the FTP server. |
java.lang.String |
getOption(java.lang.String name)
Convenience method for accessing the application properties. |
FtpServerOptions |
getOptions()
Getter method for the java bean options. |
java.lang.String |
getResources()
Getter method for the java bean resources. |
java.util.List<FtpSession> |
getSessions()
Returns the list of active sessions. |
int |
getStatus()
Getter method for the java bean status. |
UserManager |
getUserManager()
Getter method for the java bean userManager. |
boolean |
isTerminated()
Getter method for the java bean terminated. |
void |
loginPerformed(java.lang.String clientId,
boolean successful)
Number of failed long attempts. |
void |
run()
|
void |
sessionClosed(java.lang.Object sessionObj)
Method is called after a client session has been closed. |
void |
sessionOpened(java.lang.Object sessionObj)
Method is called after a client session has been opened. |
void |
setConnectionCountHWMark(int connectionCountHWMark)
Setter methode for property connectionCountHWMark. |
void |
setConnectionCountHWMarkDate(java.util.Date connectionCountHWMarkDate)
Setter methode for property connectionCountHWMarkDate. |
void |
setName(java.lang.String name)
|
void |
setOptions(FtpServerOptions options)
Setter method for the java bean options. |
void |
setResources(java.lang.String resources)
Setter method for the java bean resources. |
void |
setStatus(int status)
Setter method for the java bean status. |
void |
setUserManager(UserManager userManager)
Setter method for the java bean userManager. |
void |
uploadPerformed(java.lang.String clientId,
java.io.File file)
The event is called after a file has been uploaded by a client. |
| Methods inherited from class net.sf.hermesftp.utils.AbstractAppAwareBean |
|---|
getApplicationContext, setApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractFtpServer()
| Method Detail |
|---|
protected abstract java.net.ServerSocket createServerSocket()
throws java.io.IOException
java.io.IOException - Error on creating server socket.protected abstract FtpSessionContext createFtpContext()
public void abort()
abort in interface FtpServerpublic FtpServerOptions getOptions()
options.
getOptions in interface FtpServeroptions.public void setOptions(FtpServerOptions options)
options.
options - The value of options to set.public void run()
run in interface java.lang.Runnablepublic int getConnectionCount()
connectionCount.
getConnectionCount in interface FtpServerconnectionCount.public void cleanUpSessions()
cleanUpSessions in interface FtpServerpublic java.lang.String getOption(java.lang.String name)
name - The name of the requested property.
public java.lang.String getResources()
resources.
resources.public void setResources(java.lang.String resources)
resources.
resources - The value of resources to set.public boolean isTerminated()
terminated.
terminated.public int getStatus()
status.
getStatus in interface FtpServerstatus.public void setStatus(int status)
status.
status - The value of status to set.public UserManager getUserManager()
userManager.
getUserManager in interface FtpServeruserManager.public void setUserManager(UserManager userManager)
userManager.
userManager - The value of userManager to set.public void addFtpEventListener(FtpEventListener lstnr)
addFtpEventListener in interface FtpServerlstnr - The listener.
public void downloadPerformed(java.lang.String clientId,
java.io.File file)
downloadPerformed in interface FtpEventListenerclientId - The unique ID of a client.file - The downloaded file.
public void loginPerformed(java.lang.String clientId,
boolean successful)
loginPerformed in interface FtpEventListenerclientId - The unique ID of a client.successful - True, if the authentication was successful.
public void uploadPerformed(java.lang.String clientId,
java.io.File file)
uploadPerformed in interface FtpEventListenerclientId - The unique ID of a client.file - The uploaded file.public void sessionOpened(java.lang.Object sessionObj)
sessionOpened in interface FtpEventListenersessionObj - The closed session object.public void sessionClosed(java.lang.Object sessionObj)
sessionClosed in interface FtpEventListenersessionObj - The closed session object.public java.util.List<FtpSession> getSessions()
getSessions in interface FtpServerpublic int getConnectionCountHWMark()
getConnectionCountHWMark in interface FtpServerpublic java.util.Date getConnectionCountHWMarkDate()
getConnectionCountHWMarkDate in interface FtpServerpublic void setConnectionCountHWMark(int connectionCountHWMark)
connectionCountHWMark.
connectionCountHWMark - Value for connectionCountHWMark.public void setConnectionCountHWMarkDate(java.util.Date connectionCountHWMarkDate)
connectionCountHWMarkDate.
connectionCountHWMarkDate - Value for connectionCountHWMarkDate.public java.lang.String getName()
FtpServer
getName in interface FtpServerpublic void setName(java.lang.String name)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||