FTP-Server API

server.event
Class UserSessionObserverAdapter

java.lang.Object
  |
  +--server.event.UserSessionObserverAdapter
All Implemented Interfaces:
UserSessionObserver
Direct Known Subclasses:
Main.SessionObserver

public class UserSessionObserverAdapter
extends Object
implements UserSessionObserver

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

UserSessionObserverAdapter

public UserSessionObserverAdapter()
Method Detail

commandUpdate

public void commandUpdate(String command)
Description copied from interface: UserSessionObserver
All the client sends to the server is send though here as an echo!

Specified by:
commandUpdate in interface UserSessionObserver
Parameters:
command - command recived from the client

serverResponse

public void serverResponse(String response)
Description copied from interface: UserSessionObserver
All the server sends to the client is send though here as an echo!

Specified by:
serverResponse in interface UserSessionObserver
Parameters:
response - response send to the client

fileTransferStarted

public void fileTransferStarted(File filename)
Description copied from interface: UserSessionObserver
When a fileTransfer has started, the method is called.

Specified by:
fileTransferStarted in interface UserSessionObserver
Parameters:
filename - The file, that is beeing uploaded or downloaded.

fileTransferEnded

public void fileTransferEnded(boolean successfull)
Description copied from interface: UserSessionObserver
When a fileTransfer has ended, the method is called.

Specified by:
fileTransferEnded in interface UserSessionObserver
Parameters:
successfull - true=success, false=abort

bytesTransmitted

public void bytesTransmitted(long[] data)
Description copied from interface: UserSessionObserver
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.

Specified by:
bytesTransmitted in interface UserSessionObserver
Parameters:
data - long[] arr = {startAt, transfered, file.length()};

userLogedIn

public void userLogedIn(UserSession usersession)
Description copied from interface: UserSessionObserver
When the user logs in, this method is called.

Specified by:
userLogedIn in interface UserSessionObserver
Parameters:
usersession - The user that loged in..

userLogedOut

public void userLogedOut(UserSession usersession)
Description copied from interface: UserSessionObserver
When a user loges out, this method is called.

Specified by:
userLogedOut in interface UserSessionObserver
Parameters:
usersession - The user that loged out..

userDisconnected

public void userDisconnected(UserSession userSession,
                             int reasonCode)
Description copied from interface: UserSessionObserver
When a user gets disconnected, this method is called

Specified by:
userDisconnected in interface UserSessionObserver
Parameters:
userSession - the user, that is disconnected
reasonCode - the reason for the disconnection. (see the USER_?? statics above)

FTP-Server API