org.globus.ftp.dc
Class ManagedSocketBox

java.lang.Object
  extended by org.globus.ftp.dc.SimpleSocketBox
      extended by org.globus.ftp.dc.ManagedSocketBox
All Implemented Interfaces:
SocketBox

public class ManagedSocketBox
extends SimpleSocketBox

A container for Socket, making it available to pass a null socket reference. We use asynchronously active connect task to initialize socket, and active start transfer task to run it. We need to pass the socket reference, which is sometimes null (before initialization). This is a sane way to do it; a simple socket container. Additionally, the box contains a flag that states whether the socket is currently in use, ie whether it is assigned to some data channel. It is needed in GridFTP for data channel reuse.


Field Summary
static int BUSY
           
static int FREE
           
static boolean NON_REUSABLE
           
protected  boolean reusable
           
static boolean REUSABLE
           
protected  int status
           
 
Fields inherited from class org.globus.ftp.dc.SimpleSocketBox
socket
 
Constructor Summary
ManagedSocketBox()
           
 
Method Summary
 int getStatus()
           
 boolean isReusable()
           
 void setReusable(boolean r)
           
 void setStatus(int s)
           
 
Methods inherited from class org.globus.ftp.dc.SimpleSocketBox
getSocket, setSocket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FREE

public static final int FREE
See Also:
Constant Field Values

BUSY

public static final int BUSY
See Also:
Constant Field Values

REUSABLE

public static final boolean REUSABLE
See Also:
Constant Field Values

NON_REUSABLE

public static final boolean NON_REUSABLE
See Also:
Constant Field Values

status

protected int status

reusable

protected boolean reusable
Constructor Detail

ManagedSocketBox

public ManagedSocketBox()
Method Detail

setStatus

public void setStatus(int s)

getStatus

public int getStatus()

setReusable

public void setReusable(boolean r)

isReusable

public boolean isReusable()