|
FTP-Server API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--server.event.UserSessionObserverAdapter
Can be extended by those, who should wish to listen to a UserSession-Objekt (a client).
Field Summary |
Fields inherited from interface server.event.UserSessionObserver |
USER_AUTO_BANNED, USER_BANNED, USER_KICKED, USER_KICKED_DUE_TO_SERVER_STOP, USER_NORMAL_END, USER_ONLINE, USER_TIMEOUT |
Constructor Summary | |
UserSessionObserverAdapter()
|
Method Summary | |
void |
bytesTransmitted(long[] data)
When a file is beeing transfered, this method is called every time the server has transfered the number of bytes, that the clients may have per sek. |
void |
commandUpdate(String command)
All the client sends to the server is send though here as an echo! |
void |
fileTransferEnded(boolean successfull)
When a fileTransfer has ended, the method is called. |
void |
fileTransferStarted(File filename)
When a fileTransfer has started, the method is called. |
void |
serverResponse(String response)
All the server sends to the client is send though here as an echo! |
void |
userDisconnected(UserSession userSession,
int reasonCode)
When a user gets disconnected, this method is called |
void |
userLogedIn(UserSession usersession)
When the user logs in, this method is called. |
void |
userLogedOut(UserSession usersession)
When a user loges out, this method is called. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UserSessionObserverAdapter()
Method Detail |
public void commandUpdate(String command)
UserSessionObserver
commandUpdate
in interface UserSessionObserver
command
- command recived from the clientpublic void serverResponse(String response)
UserSessionObserver
serverResponse
in interface UserSessionObserver
response
- response send to the clientpublic void fileTransferStarted(File filename)
UserSessionObserver
fileTransferStarted
in interface UserSessionObserver
filename
- The file, that is beeing uploaded or downloaded.public void fileTransferEnded(boolean successfull)
UserSessionObserver
fileTransferEnded
in interface UserSessionObserver
successfull
- true=success, false=abortpublic void bytesTransmitted(long[] data)
UserSessionObserver
bytesTransmitted
in interface UserSessionObserver
data
- long[] arr = {startAt, transfered, file.length()};public void userLogedIn(UserSession usersession)
UserSessionObserver
userLogedIn
in interface UserSessionObserver
usersession
- The user that loged in..public void userLogedOut(UserSession usersession)
UserSessionObserver
userLogedOut
in interface UserSessionObserver
usersession
- The user that loged out..public void userDisconnected(UserSession userSession, int reasonCode)
UserSessionObserver
userDisconnected
in interface UserSessionObserver
userSession
- the user, that is disconnectedreasonCode
- the reason for the disconnection. (see the USER_?? statics above)
|
FTP-Server API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |