Package 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/interfaces inherited from class org.globus.ftp.vanilla.FTPServerFacade
FTPServerFacade.LocalControlChannel
-
-
Field Summary
Fields Modifier and Type Field Description protected GridFTPSessiongSessionprotected SocketPoolsocketPoolprotected StripeContextManagerstripeRetrContextManagerprotected TransferThreadManagertransferThreadManager-
Fields inherited from class org.globus.ftp.vanilla.FTPServerFacade
ANY_PORT, dataChannelFactory, DEFAULT_QUEUE, localControlChannel, remoteControlChannel, remoteServerAddress, serverSocket, session
-
-
Constructor Summary
Constructors Constructor Description GridFTPServerFacade(GridFTPControlChannel remoteControlChannel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()close data channels, but not control, nor the serverstatic java.net.Socketauthenticate(java.net.Socket simpleSocket, boolean isClientSocket, org.ietf.jgss.GSSCredential credential, int protection, DataChannelAuthentication dcau)authenticate socket.voidclose()protected TransferContextcreateTransferContext()TransferThreadManagercreateTransferThreadManager()voidretrieve(DataSource source)Retrieve the data from the data source and write to the data channel.voidsetActive(HostPort hp)Asynchronous; return before completion.voidsetCredential(org.ietf.jgss.GSSCredential cred)voidsetDataChannelAuthentication(DataChannelAuthentication authentication)voidsetDataChannelProtection(int protection)voidsetOptions(Options opts)Do nothing; this class does not support any optionsHostPortsetPassive(int port, int queue)Start the local servervoidsetStripedActive(HostPortList hpl)HostPortListsetStripedPassive()HostPortListsetStripedPassive(int port, int queue)voidsetTCPBufferSize(int size)This method needs to be called BEFORE the local socket(s) get created.voidstore(DataSink sink)Store the data from the data channel to the data sink.protected voidtransferAbort()-
Methods inherited from class org.globus.ftp.vanilla.FTPServerFacade
authorize, cannotPropagateError, exceptionToControlChannel, exceptionToControlChannel, getControlChannel, getSession, setPassive, setProtectionBufferSize, setTransferMode, setTransferType, stopTaskThread, unblockServer
-
-
-
-
Field Detail
-
gSession
protected GridFTPSession gSession
-
socketPool
protected SocketPool socketPool
-
transferThreadManager
protected TransferThreadManager transferThreadManager
-
stripeRetrContextManager
protected StripeContextManager stripeRetrContextManager
-
-
Constructor Detail
-
GridFTPServerFacade
public GridFTPServerFacade(GridFTPControlChannel remoteControlChannel)
-
-
Method Detail
-
setCredential
public void setCredential(org.ietf.jgss.GSSCredential cred)
-
setDataChannelProtection
public void setDataChannelProtection(int protection)
-
setDataChannelAuthentication
public void setDataChannelAuthentication(DataChannelAuthentication authentication)
-
setOptions
public void setOptions(Options opts)
Description copied from class:FTPServerFacadeDo nothing; this class does not support any options- Overrides:
setOptionsin classFTPServerFacade
-
setTCPBufferSize
public void setTCPBufferSize(int size) throws ClientExceptionThis method needs to be called BEFORE the local socket(s) get created. In other words, before setActive(), setPassive(), get(), put(), etc.- Throws:
ClientException
-
transferAbort
protected void transferAbort()
- Overrides:
transferAbortin classFTPServerFacade
-
setActive
public void setActive(HostPort hp) throws java.net.UnknownHostException, ClientException, java.io.IOException
Description copied from class:FTPServerFacadeAsynchronous; 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:
setActivein classFTPServerFacade- Throws:
java.net.UnknownHostExceptionClientExceptionjava.io.IOException
-
setStripedActive
public void setStripedActive(HostPortList hpl) throws java.net.UnknownHostException, java.io.IOException
- Throws:
java.net.UnknownHostExceptionjava.io.IOException
-
setPassive
public HostPort setPassive(int port, int queue) throws java.io.IOException
Description copied from class:FTPServerFacadeStart the local server- Overrides:
setPassivein classFTPServerFacade- Parameters:
port- required server port; can be set to ANY_PORTqueue- max size of queue of awaiting new connection requests- Returns:
- the server address
- Throws:
java.io.IOException
-
setStripedPassive
public HostPortList setStripedPassive() throws java.io.IOException
- Throws:
java.io.IOException
-
setStripedPassive
public HostPortList setStripedPassive(int port, int queue) throws java.io.IOException
- Throws:
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:
storein classFTPServerFacade- Parameters:
sink- source of data
-
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:
retrievein classFTPServerFacade- Parameters:
source- source of data
-
abort
public void abort() throws java.io.IOExceptionDescription copied from class:FTPServerFacadeclose data channels, but not control, nor the server- Overrides:
abortin classFTPServerFacade- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Overrides:
closein classFTPServerFacade- Throws:
java.io.IOException
-
authenticate
public static java.net.Socket authenticate(java.net.Socket simpleSocket, boolean isClientSocket, org.ietf.jgss.GSSCredential credential, int protection, DataChannelAuthentication dcau) throws java.lang.Exceptionauthenticate socket. if protection on, return authenticated socket wrapped over the original simpleSocket, else return original socket.- Throws:
java.lang.Exception
-
createTransferContext
protected TransferContext createTransferContext()
- Overrides:
createTransferContextin classFTPServerFacade
-
createTransferThreadManager
public TransferThreadManager createTransferThreadManager()
-
-