gnu.inet.ftp
Class PassiveGetter

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--gnu.inet.ftp.Getter
              |
              +--gnu.inet.ftp.PassiveGetter
All Implemented Interfaces:
ConnectionEventSource, java.lang.Runnable, TransferEventSource

public class PassiveGetter
extends Getter

This class implements an FTP-style data connection thread for GETing files/data passively. This class is used internally to the FtpClient class.


Fields inherited from class gnu.inet.ftp.Getter
BUFFER_SIZE, cancelled, connectionListeners, mode, ostream, transferListeners, type
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PassiveGetter(java.io.OutputStream out, PassiveConnection connection)
          Create a new PassiveGetter instance with the given OutpuStream for data output and using the given PassiveParameters to connect to the server.
 
Method Summary
 void cancel()
          cancel a running transfer sets a flag and calls interrupt() can only be called once
 void run()
          get data from server using given parameters.
 void setDebug(boolean value)
          Sets the ConsoleLogger's debug output.
 
Methods inherited from class gnu.inet.ftp.Getter
addConnectionListener, addConnectionListeners, addTransferListener, addTransferListeners, removeConnectionListener, removeTransferListener, setMode, setOutputStream, setType, signalConnectionClosed, signalConnectionFailed, signalConnectionOpened, signalTransferCompleted, signalTransfered, signalTransferStarted, 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, 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
 

Constructor Detail

PassiveGetter

public PassiveGetter(java.io.OutputStream out,
                     PassiveConnection connection)
Create a new PassiveGetter instance with the given OutpuStream for data output and using the given PassiveParameters to connect to the server.
Parameters:
out - the OutputStream where retrieved data will be written
connection - the PassiveConnection to the server
Method Detail

setDebug

public void setDebug(boolean value)
Sets the ConsoleLogger's debug output. Does nothing for log4j. Log4j needs to be configured using log4j.properties
Overrides:
setDebug in class Getter
Parameters:
value - new debug flag value

cancel

public void cancel()
cancel a running transfer sets a flag and calls interrupt() can only be called once
Overrides:
cancel in class Getter

run

public void run()
get data from server using given parameters.
Overrides:
run in class java.lang.Thread