|
FTP-Server API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Must be implemented by those, who wishes to listen on a UserSession-Object (a client).
Field Summary | |
static int |
USER_AUTO_BANNED
|
static int |
USER_BANNED
|
static int |
USER_KICKED
|
static int |
USER_KICKED_DUE_TO_SERVER_STOP
|
static int |
USER_NORMAL_END
|
static int |
USER_ONLINE
|
static int |
USER_TIMEOUT
|
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. |
Field Detail |
public static final int USER_ONLINE
public static final int USER_NORMAL_END
public static final int USER_KICKED
public static final int USER_TIMEOUT
public static final int USER_BANNED
public static final int USER_AUTO_BANNED
public static final int USER_KICKED_DUE_TO_SERVER_STOP
Method Detail |
public void commandUpdate(String command)
command
- command recived from the clientpublic void serverResponse(String response)
response
- response send to the clientpublic void fileTransferStarted(File filename)
filename
- The file, that is beeing uploaded or downloaded.public void fileTransferEnded(boolean successfull)
successfull
- true=success, false=abortpublic void bytesTransmitted(long[] data)
data
- long[] arr = {startAt, transfered, file.length()};public void userLogedIn(UserSession usersession)
usersession
- The user that loged in..public void userLogedOut(UserSession usersession)
usersession
- The user that loged out..public void userDisconnected(UserSession userSession, int reasonCode)
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 |