edtFTPj/Free - Open-source FTP library for Java | Download


com.enterprisedt.net.ftp
Interface DataChannelCallback


public interface DataChannelCallback

Callback that users can implement to intercept the reply from PASV and substitute a different IP address or port number to connect to. Similarly the PORT command being sent to the server can also be intercepted and modified.

Version:
$Revision: 1.1 $
Author:
Bruce Blackshaw

Method Summary
 IPEndpoint onPASVResponse(IPEndpoint endpoint)
          If this callback is implemented, it should return the endpoint that the user wishes to connect to.
 IPEndpoint onPORTCommand(IPEndpoint endpoint)
          If this callback is implemented, it should return the endpoint that the server should connect to in active (PORT) mode.
 

Method Detail

onPASVResponse

IPEndpoint onPASVResponse(IPEndpoint endpoint)
If this callback is implemented, it should return the endpoint that the user wishes to connect to. The supplied endpoint is what the server is returning.

Parameters:
endpoint - the endpoint specified by the server's response to the PASV command
Returns:
the actual endpoint that should be used

onPORTCommand

IPEndpoint onPORTCommand(IPEndpoint endpoint)
If this callback is implemented, it should return the endpoint that the server should connect to in active (PORT) mode. The supplied endpoint is what the client is going to use..

Parameters:
endpoint - the endpoint the client will begin listening on
Returns:
the actual endpoint that should be used


Copyright (c) 2001-2007 Enterprise Distributed Technologies Ltd. All Rights Reserved.