Package org.globus.ftp.extended
Class GridFTPServerFacade
java.lang.Object
org.globus.ftp.vanilla.FTPServerFacade
org.globus.ftp.extended.GridFTPServerFacade
-
Nested Class Summary
Nested classes/interfaces inherited from class org.globus.ftp.vanilla.FTPServerFacade
FTPServerFacade.LocalControlChannel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GridFTPSession
private static org.apache.commons.logging.Log
protected SocketPool
protected StripeContextManager
protected TransferThreadManager
Fields inherited from class org.globus.ftp.vanilla.FTPServerFacade
ANY_PORT, dataChannelFactory, DEFAULT_QUEUE, localControlChannel, remoteControlChannel, remoteServerAddress, serverSocket, session
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
close data channels, but not control, nor the serverstatic Socket
authenticate
(Socket simpleSocket, boolean isClientSocket, GSSCredential credential, int protection, DataChannelAuthentication dcau) authenticate socket.void
close()
private void
All sockets opened when this server was active should send a special EBlock header before closing.protected TransferContext
void
retrieve
(DataSource source) Retrieve the data from the data source and write to the data channel.void
Asynchronous; return before completion.void
setCredential
(GSSCredential cred) void
setDataChannelAuthentication
(DataChannelAuthentication authentication) void
setDataChannelProtection
(int protection) void
setOptions
(Options opts) Do nothing; this class does not support any optionssetPassive
(int port, int queue) Start the local servervoid
setStripedPassive
(int port, int queue) void
setTCPBufferSize
(int size) This method needs to be called BEFORE the local socket(s) get created.void
Store the data from the data channel to the data sink.protected void
Methods inherited from class org.globus.ftp.vanilla.FTPServerFacade
authorize, cannotPropagateError, exceptionToControlChannel, exceptionToControlChannel, getControlChannel, getSession, setPassive, setProtectionBufferSize, setTransferMode, setTransferType, stopTaskThread, unblockServer
-
Field Details
-
logger
private static org.apache.commons.logging.Log logger -
gSession
-
socketPool
-
transferThreadManager
-
stripeRetrContextManager
-
-
Constructor Details
-
GridFTPServerFacade
-
-
Method Details
-
setCredential
-
setDataChannelProtection
public void setDataChannelProtection(int protection) -
setDataChannelAuthentication
-
setOptions
Description copied from class:FTPServerFacade
Do nothing; this class does not support any options- Overrides:
setOptions
in classFTPServerFacade
-
setTCPBufferSize
This 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:
transferAbort
in classFTPServerFacade
-
closeOutgoingSockets
All sockets opened when this server was active should send a special EBlock header before closing.- Throws:
ClientException
-
setActive
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 classFTPServerFacade
- Throws:
UnknownHostException
ClientException
IOException
-
setStripedActive
- Throws:
UnknownHostException
IOException
-
setPassive
Description copied from class:FTPServerFacade
Start the local server- Overrides:
setPassive
in 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:
IOException
-
setStripedPassive
- Throws:
IOException
-
setStripedPassive
- Throws:
IOException
-
store
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 classFTPServerFacade
- Parameters:
sink
- source of data
-
retrieve
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 classFTPServerFacade
- Parameters:
source
- source of data
-
abort
Description copied from class:FTPServerFacade
close data channels, but not control, nor the server- Overrides:
abort
in classFTPServerFacade
- Throws:
IOException
-
close
- Overrides:
close
in classFTPServerFacade
- Throws:
IOException
-
authenticate
public static Socket authenticate(Socket simpleSocket, boolean isClientSocket, GSSCredential credential, int protection, DataChannelAuthentication dcau) throws Exception authenticate socket. if protection on, return authenticated socket wrapped over the original simpleSocket, else return original socket.- Throws:
Exception
-
createTransferContext
- Overrides:
createTransferContext
in classFTPServerFacade
-
createTransferThreadManager
-