public class EventCollector extends java.lang.Object implements EventListener
Constructor and Description |
---|
EventCollector() |
Modifier and Type | Method and Description |
---|---|
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
|
public boolean isLogConnectionIdentifiers()
public void setLogConnectionIdentifiers(boolean logConnectionIdentifiers)
logConnectionIdentifiers
- 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 transferredCopyright © 2001-2014 Enterprise Distributed Technologies Ltd. All Rights Reserved.