gnu.inet.ftp
Class ActiveGetter

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

public class ActiveGetter
extends Getter

This class implements an FTP-style data connection server thread for GETing files/data non-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
ActiveGetter(java.io.OutputStream out)
          Create a new ActiveGetter with the given OutputStream for data output.
 
Method Summary
 java.net.InetAddress getInetAddress()
          get the local IP address that this ActiveGetter is listening on
 int getPort()
          get the local port this ActiveGetter is listening on
 void run()
          get data from server using given parameters.
 void setTimeout(int milliseconds)
          Set the connection timeout in milliseconds.
 
Methods inherited from class gnu.inet.ftp.Getter
addConnectionListener, addConnectionListeners, addTransferListener, addTransferListeners, cancel, removeConnectionListener, removeTransferListener, setDebug, 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

ActiveGetter

public ActiveGetter(java.io.OutputStream out)
             throws java.io.IOException
Create a new ActiveGetter with the given OutputStream for data output.
Throws:
java.io.IOException - an IO error occurred with the ServerSocket
Method Detail

getPort

public int getPort()
get the local port this ActiveGetter is listening on
Returns:
port number

getInetAddress

public java.net.InetAddress getInetAddress()
get the local IP address that this ActiveGetter is listening on
Returns:
server socket IP address

setTimeout

public void setTimeout(int milliseconds)
Set the connection timeout in milliseconds. This method must be called before start()/run() for the value to take affect.
Parameters:
milliseconds - the socket timeout value in milliseconds

run

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