Package org.globus.ftp.dc
Class PassiveConnectTask
- java.lang.Object
-
- org.globus.ftp.dc.Task
-
- org.globus.ftp.dc.PassiveConnectTask
-
- Direct Known Subclasses:
GridFTPPassiveConnectTask
public class PassiveConnectTask extends Task
This task will wait on the local server for the new incoming connection and when it comes it will start a new transfer thread on the new connection. It is little tricky: it will cause data channel to start a new thread. By the time this task completes, the new thread is running the transfer. Any resulting exceptions are piped to the local control channel.
-
-
Field Summary
Fields Modifier and Type Field Description protected TransferContext
context
protected BasicServerControlChannel
control
protected DataChannelFactory
factory
protected static org.apache.commons.logging.Log
logger
protected java.net.ServerSocket
myServer
protected SocketBox
mySocketBox
protected Session
session
protected DataSink
sink
protected DataSource
source
-
Constructor Summary
Constructors Constructor Description PassiveConnectTask(java.net.ServerSocket myServer, DataSink sink, BasicServerControlChannel control, Session session, DataChannelFactory factory, TransferContext context)
PassiveConnectTask(java.net.ServerSocket myServer, DataSource source, BasicServerControlChannel control, Session session, DataChannelFactory factory, TransferContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
close()
void
execute()
private void
init(java.net.ServerSocket myServer, BasicServerControlChannel control, Session session, DataChannelFactory factory, TransferContext context)
protected SocketBox
openSocket()
Override this to implement authenticationvoid
stop()
-
Methods inherited from class org.globus.ftp.dc.Task
setComplete, waitFor
-
-
-
-
Field Detail
-
logger
protected static org.apache.commons.logging.Log logger
-
myServer
protected java.net.ServerSocket myServer
-
mySocketBox
protected SocketBox mySocketBox
-
sink
protected DataSink sink
-
source
protected DataSource source
-
control
protected BasicServerControlChannel control
-
session
protected Session session
-
factory
protected DataChannelFactory factory
-
context
protected TransferContext context
-
-
Constructor Detail
-
PassiveConnectTask
public PassiveConnectTask(java.net.ServerSocket myServer, DataSink sink, BasicServerControlChannel control, Session session, DataChannelFactory factory, TransferContext context)
-
PassiveConnectTask
public PassiveConnectTask(java.net.ServerSocket myServer, DataSource source, BasicServerControlChannel control, Session session, DataChannelFactory factory, TransferContext context)
-
-
Method Detail
-
init
private void init(java.net.ServerSocket myServer, BasicServerControlChannel control, Session session, DataChannelFactory factory, TransferContext context)
-
openSocket
protected SocketBox openSocket() throws java.lang.Exception
Override this to implement authentication- Throws:
java.lang.Exception
-
close
private void close()
-
-