org.globus.ftp.dc
Class PassiveConnectTask

java.lang.Object
  extended by org.globus.ftp.dc.Task
      extended by 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
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
           
 
Fields inherited from class org.globus.ftp.dc.Task
complete, exception
 
Constructor Summary
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
 void execute()
           
protected  SocketBox openSocket()
          Override this to implement authentication
 void stop()
           
 
Methods inherited from class org.globus.ftp.dc.Task
setComplete, waitFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

execute

public void execute()
Specified by:
execute in class Task

openSocket

protected SocketBox openSocket()
                        throws java.lang.Exception
Override this to implement authentication

Throws:
java.lang.Exception

stop

public void stop()
Overrides:
stop in class Task


Copyright © 2013. All Rights Reserved.