GridFTPServerFacade (Java Globus API)

org.globus.ftp.extended
Class GridFTPServerFacade

java.lang.Object
  |
  +--org.globus.ftp.vanilla.FTPServerFacade
        |
        +--org.globus.ftp.extended.GridFTPServerFacade

public class GridFTPServerFacade
extends FTPServerFacade


Nested Class Summary
 
Nested classes inherited from class org.globus.ftp.vanilla.FTPServerFacade
FTPServerFacade.LocalControlChannel
 
Field Summary
protected  GridFTPSession gSession
           
protected  SocketBox[] socketBoxList
           
protected  StripeContextManager stripeRetrContextManager
           
 
Fields inherited from class org.globus.ftp.vanilla.FTPServerFacade
ANY_PORT, dataChannelFactory, DEFAULT_QUEUE, localControlChannel, server, session, socketBox, taskThread
 
Constructor Summary
GridFTPServerFacade()
           
 
Method Summary
 void abort()
          close data channels, but not control, nor the server
static java.net.Socket authenticate(java.net.Socket simpleSocket, boolean isClientSocket, int protection)
          authenticate socket.
protected  ActiveConnectTask createActiveConnectTask(HostPort hp, SocketBox box)
           
protected  PassiveConnectTask createPassiveConnectTask(DataSink sink, TransferContext context)
           
protected  PassiveConnectTask createPassiveConnectTask(DataSource source, TransferContext context)
           
protected  TransferContext createTransferContext()
           
 void retrieve(DataSource source)
          Retrieve the data from the data source and write to the data channel.
 void setActive(HostPort hp)
          Asynchronous; return before completion.
 void setDataChannelAuthentication(DataChannelAuthentication authentication)
           
 void setDataChannelProtection(int protection)
           
 void setOptions(Options opts)
          Do nothing; this class does not support any options
 void setStripedActive(HostPortList hpl)
           
 HostPortList setStripedPassive()
           
 HostPortList setStripedPassive(int port, int queue)
           
 void setTCPBufferSize(int size)
          This method needs to be called BEFORE the local socket(s) get created.
 void store(DataSink sink)
          Store the data from the data channel to the data sink.
 
Methods inherited from class org.globus.ftp.vanilla.FTPServerFacade
authorize, cannotPropagateError, close, createActiveStartTransferTask, createActiveStartTransferTask, exceptionToControlChannel, exceptionToControlChannel, finalize, getControlChannel, getLocalHostAddress, getSession, runTask, setPassive, setPassive, setProtectionBufferSize, setTransferMode, setTransferType
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gSession

protected GridFTPSession gSession

socketBoxList

protected SocketBox[] socketBoxList

stripeRetrContextManager

protected StripeContextManager stripeRetrContextManager
Constructor Detail

GridFTPServerFacade

public GridFTPServerFacade()
Method Detail

setDataChannelProtection

public void setDataChannelProtection(int protection)

setDataChannelAuthentication

public void setDataChannelAuthentication(DataChannelAuthentication authentication)

setOptions

public void setOptions(Options opts)
Description copied from class: FTPServerFacade
Do nothing; this class does not support any options

Overrides:
setOptions in class FTPServerFacade

setTCPBufferSize

public void setTCPBufferSize(int size)
This method needs to be called BEFORE the local socket(s) get created. In other words, before setActive(), setPassive(), get(), put(), etc.


setActive

public void setActive(HostPort hp)
               throws java.net.UnknownHostException,
                      java.io.IOException
Description copied from class: FTPServerFacade
Asynchronous; return before completion. Connect to the remote server. Any exception that would occure will not be thrown but returned through the local control channel.

Overrides:
setActive in class FTPServerFacade
java.net.UnknownHostException
java.io.IOException

setStripedActive

public void setStripedActive(HostPortList hpl)
                      throws java.net.UnknownHostException,
                             java.io.IOException
java.net.UnknownHostException
java.io.IOException

setStripedPassive

public HostPortList setStripedPassive()
                               throws java.io.IOException
java.io.IOException

setStripedPassive

public HostPortList setStripedPassive(int port,
                                      int queue)
                               throws java.io.IOException
java.io.IOException

store

public void store(DataSink sink)
Store the data from the data channel to the data sink. Does not block. If operation fails, exception might be thrown via local control channel.

Overrides:
store in class FTPServerFacade

retrieve

public void retrieve(DataSource source)
Retrieve the data from the data source and write to the data channel. This method does not block. If operation fails, exception might be thrown via local control channel.

Overrides:
retrieve in class FTPServerFacade
Parameters:
source - source of data

createActiveConnectTask

protected ActiveConnectTask createActiveConnectTask(HostPort hp,
                                                    SocketBox box)
Overrides:
createActiveConnectTask in class FTPServerFacade

createPassiveConnectTask

protected PassiveConnectTask createPassiveConnectTask(DataSource source,
                                                      TransferContext context)
Overrides:
createPassiveConnectTask in class FTPServerFacade

createPassiveConnectTask

protected PassiveConnectTask createPassiveConnectTask(DataSink sink,
                                                      TransferContext context)
Overrides:
createPassiveConnectTask in class FTPServerFacade

abort

public void abort()
           throws java.io.IOException
Description copied from class: FTPServerFacade
close data channels, but not control, nor the server

Overrides:
abort in class FTPServerFacade
java.io.IOException

authenticate

public static java.net.Socket authenticate(java.net.Socket simpleSocket,
                                           boolean isClientSocket,
                                           int protection)
                                    throws java.lang.Exception
authenticate socket. if protection on, return authenticated socket wrapped over the original simpleSocket, else return original socket.

java.lang.Exception

createTransferContext

protected TransferContext createTransferContext()
Overrides:
createTransferContext in class FTPServerFacade