|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--gnu.inet.ftp.Putter
implements a FTP-style data connection server thread for PUTing files/data.
This class mainly serves as a superclass to ActivePutter and PassivePutter.
| Field Summary | |
static int |
BUFFER_SIZE
|
protected boolean |
cancelled
|
protected java.util.Vector |
connectionListeners
|
protected java.io.InputStream |
istream
|
protected char |
mode
|
protected java.util.Vector |
transferListeners
|
protected char |
type
|
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
Putter()
default constructor |
|
| Method Summary | |
void |
addConnectionListener(ConnectionListener listener)
add a ConnectionListener to the list of connectionListeners |
void |
addConnectionListeners(java.util.Vector listeners)
add a set of ConnectionListeners to the list of connectionListeners |
void |
addTransferListener(TransferListener listener)
register a TransferListener to the list of transfer listeners. |
void |
addTransferListeners(java.util.Vector listeners)
add a set of TransferListeners to the list of transfer listeners |
void |
cancel()
cancel a running transfer sets a flag and calls interrupt() can only be called once |
void |
removeConnectionListener(ConnectionListener listener)
De-register a ConnectionListener with the event source |
void |
removeTransferListener(TransferListener listener)
De-register a TransferListener with the event source. |
void |
setDebug(boolean value)
Sets the ConsoleLogger's debug output. |
void |
setInputStream(java.io.InputStream istream)
set the InputStream to use for data input |
void |
setMode(char mode)
set the mode value. |
void |
setType(char type)
set the type value. |
protected void |
signalConnectionClosed(ConnectionEvent event)
signal that a connection has been closed |
protected void |
signalConnectionFailed(java.lang.Exception exception)
signal that a connection has encountered an error |
protected void |
signalConnectionOpened(ConnectionEvent event)
signal that a connection has been opened |
protected void |
signalTransferCompleted()
signal that a transfer has completed |
protected void |
signalTransfered(long amount)
signal that a transfer has completed |
protected void |
signalTransferStarted()
signal that a transfer has started |
void |
start()
|
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int BUFFER_SIZE
protected java.io.InputStream istream
protected boolean cancelled
protected java.util.Vector connectionListeners
protected java.util.Vector transferListeners
protected char mode
protected char type
| Constructor Detail |
public Putter()
| Method Detail |
public void start()
start in class java.lang.Threadpublic void setInputStream(java.io.InputStream istream)
istream - the InputStream to read data frompublic void setMode(char mode)
mode - the new mode settingpublic void setType(char type)
type - the new type settingpublic void setDebug(boolean value)
value - new debug flag valuepublic void cancel()
public void addConnectionListener(ConnectionListener listener)
addConnectionListener in interface ConnectionEventSourcelistener - the ConnectionListener to add to the listpublic void addConnectionListeners(java.util.Vector listeners)
addConnectionListeners in interface ConnectionEventSourcelisteners - the ConnectionListeners to add to the listpublic void removeConnectionListener(ConnectionListener listener)
removeConnectionListener in interface ConnectionEventSourcelistener - the ConnectionListener to remove from the list of listenerspublic void addTransferListener(TransferListener listener)
addTransferListener in interface TransferEventSourcelistener - the TransferListener to register with the event sourcepublic void addTransferListeners(java.util.Vector listeners)
addTransferListeners in interface TransferEventSourcelisteners - the TransferListeners to add to the listpublic void removeTransferListener(TransferListener listener)
removeTransferListener in interface TransferEventSourcelistener - the TransferListener to de-register with the event sourceprotected void signalConnectionOpened(ConnectionEvent event)
event - the event to distribute to each ConnectionListenerprotected void signalConnectionClosed(ConnectionEvent event)
event - the event to distribute to each ConnectionListenerprotected void signalConnectionFailed(java.lang.Exception exception)
exception - the exception that was thrownprotected void signalTransferStarted()
protected void signalTransferCompleted()
protected void signalTransfered(long amount)
amount - the amount of data (in octets) that has been transfered
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||