|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.enterprisedt.net.ftp.EventCollector
public class EventCollector
Logs events in an internal buffer.
Constructor Summary | |
---|---|
EventCollector()
|
Method Summary | |
---|---|
void |
bytesTransferred(java.lang.String connId,
java.lang.String remoteFilename,
long count)
Report the number of bytes transferred so far. |
void |
clearLog()
Clear the log of all messages |
void |
commandSent(java.lang.String connId,
java.lang.String cmd)
Log an FTP command being sent to the server. |
void |
downloadCompleted(java.lang.String connId,
java.lang.String remoteFilename)
Notifies that a download has completed |
void |
downloadStarted(java.lang.String connId,
java.lang.String remoteFilename)
Notifies that a download has started |
java.lang.String |
getLog()
Get the log of messages |
boolean |
isLogCommands()
Are commands and replies being logged? Default is true. |
boolean |
isLogConnectionIdentifiers()
Are connection identifiers being logged? Default is false. |
boolean |
isLogTransferProgress()
Is transfer progress being logged? Default is false. |
boolean |
isLogTransferStartComplete()
Are transfer start and complete events being logged? Default is true. |
void |
replyReceived(java.lang.String connId,
java.lang.String reply)
Log an FTP reply being sent back to the client. |
void |
setLogCommands(boolean logCommands)
Should commands and replies be logged? Default is true. |
void |
setLogConnectionIdentifiers(boolean logConnectionIdentifiers)
Should connection identifiers be logged? Default is false. |
void |
setLogTransferProgress(boolean logTransferProgress)
Should transfer progress be logged? Default is false. |
void |
setLogTransferStartComplete(boolean logTransferStartComplete)
Should transfer start and complete events be logged? Default is true. |
void |
uploadCompleted(java.lang.String connId,
java.lang.String remoteFilename)
Notifies that an upload has completed |
void |
uploadStarted(java.lang.String connId,
java.lang.String remoteFilename)
Notifies that an upload has started |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventCollector()
Method Detail |
---|
public boolean isLogConnectionIdentifiers()
public void setLogConnectionIdentifiers(boolean logConnectionIdentifiers)
logCommands
- true to enable logging of connection identifiers.public boolean isLogCommands()
public void setLogCommands(boolean logCommands)
logCommands
- true to enable logging of commands and replies.public boolean isLogTransferStartComplete()
public void setLogTransferStartComplete(boolean logTransferStartComplete)
logTransferStartComplete
- true if transfer start and complete events are to be logged.public boolean isLogTransferProgress()
public void setLogTransferProgress(boolean logTransferProgress)
logTransferProgress
- true if transfer progress is to be logged.public java.lang.String getLog()
public void clearLog()
public void commandSent(java.lang.String connId, java.lang.String cmd)
commandSent
in interface EventListener
connID
- Identifier of FTP connectioncmd
- command stringpublic void replyReceived(java.lang.String connId, java.lang.String reply)
replyReceived
in interface EventListener
connID
- Identifier of FTP connectionreply
- reply stringpublic void downloadStarted(java.lang.String connId, java.lang.String remoteFilename)
downloadStarted
in interface EventListener
connID
- Identifier of FTP connectionremoteFilename
- remote file namepublic void downloadCompleted(java.lang.String connId, java.lang.String remoteFilename)
downloadCompleted
in interface EventListener
connID
- Identifier of FTP connectionremoteFilename
- remote file namepublic void uploadStarted(java.lang.String connId, java.lang.String remoteFilename)
uploadStarted
in interface EventListener
connID
- Identifier of FTP connectionremoteFilename
- remote file namepublic void uploadCompleted(java.lang.String connId, java.lang.String remoteFilename)
uploadCompleted
in interface EventListener
connID
- Identifier of FTP connectionremoteFilename
- remote file namepublic void bytesTransferred(java.lang.String connId, java.lang.String remoteFilename, long count)
bytesTransferred
in interface EventListener
connID
- Identifier of FTP connectionremoteFilename
- Name of remote filecount
- count of bytes transferred
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |