public class TransferThreadManager extends Object
Modifier and Type | Field and Description |
---|---|
protected DataChannelFactory |
dataChannelFactory |
protected GridFTPServerFacade |
facade |
protected GridFTPSession |
gSession |
protected BasicServerControlChannel |
localControlChannel |
protected SocketPool |
socketPool |
protected TaskThread |
taskThread |
protected int |
transferThreadCount |
Constructor and Description |
---|
TransferThreadManager(SocketPool socketPool,
GridFTPServerFacade facade,
BasicServerControlChannel myControlChannel,
GridFTPSession gSession) |
Modifier and Type | Method and Description |
---|---|
void |
activeClose(TransferContext context,
int connections)
use only in mode E
|
void |
activeConnect(HostPort hp,
int connections)
Act as the active side.
|
void |
close() |
int |
getTransferThreadCount() |
void |
passiveConnect(DataSink sink,
TransferContext context,
int connections,
ServerSocket serverSocket)
Accept connections from the remote server,
and start transfer threads that will read incoming data and store
in the sink.
|
void |
passiveConnect(DataSource source,
TransferContext context,
ServerSocket serverSocket)
Accept connection from the remote server
and start transfer thread that will read incoming data and store in
the sink.
|
void |
startTransfer(DataSink sink,
TransferContext context,
int connections,
boolean reusable)
This should be used once the remote active server connected to us.
|
void |
startTransfer(DataSource source,
TransferContext context,
int connections,
boolean reusable)
This should be used once the remote active server connected to us.
|
void |
stopTaskThread() |
void |
transferThreadStarting() |
void |
transferThreadTerminating() |
protected SocketPool socketPool
protected GridFTPServerFacade facade
protected BasicServerControlChannel localControlChannel
protected GridFTPSession gSession
protected TaskThread taskThread
protected int transferThreadCount
protected DataChannelFactory dataChannelFactory
public TransferThreadManager(SocketPool socketPool, GridFTPServerFacade facade, BasicServerControlChannel myControlChannel, GridFTPSession gSession)
public void activeConnect(HostPort hp, int connections)
public void activeClose(TransferContext context, int connections)
public void startTransfer(DataSource source, TransferContext context, int connections, boolean reusable) throws ServerException
reusable
- if set to false, the sockets will not be reused after
the transferServerException
public void startTransfer(DataSink sink, TransferContext context, int connections, boolean reusable) throws ServerException
reusable
- if set to false, the sockets will not be reused after
the transferServerException
public void passiveConnect(DataSink sink, TransferContext context, int connections, ServerSocket serverSocket) throws ServerException
connections
- the number of expected connectionsServerException
public void passiveConnect(DataSource source, TransferContext context, ServerSocket serverSocket) throws ServerException
ServerException
public int getTransferThreadCount()
public void transferThreadStarting()
public void transferThreadTerminating()
public void stopTaskThread()
public void close()
Copyright © 2016. All rights reserved.