org.apache.ftpserver
Class DataConnectionConfigurationFactory

java.lang.Object
  extended by org.apache.ftpserver.DataConnectionConfigurationFactory

public class DataConnectionConfigurationFactory
extends java.lang.Object

Data connection factory

Version:
$Rev: 701863 $, $Date: 2008-10-05 21:25:50 +0200 (Sun, 05 Oct 2008) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
DataConnectionConfigurationFactory()
           
 
Method Summary
 DataConnectionConfiguration createDataConnectionConfiguration()
          Create a DataConnectionConfiguration instance based on the configuration on this factory
 java.lang.String getActiveLocalAddress()
          Get the local address for active mode data transfer.
 int getActiveLocalPort()
          Get the active local port number.
 int getIdleTime()
          Get the maximum idle time in seconds.
 java.lang.String getPassiveAddress()
          Get passive host.
 java.lang.String getPassiveExternalAddress()
          Get the passive address that will be returned to clients on the PASV command.
 java.lang.String getPassivePorts()
          Retrieve the passive ports configured for this data connection
 SslConfiguration getSslConfiguration()
          Get the SslConfiguration to be used by data connections
 boolean isActiveEnabled()
          Is PORT enabled?
 boolean isActiveIpCheck()
          Check the PORT IP?
 boolean isImplicitSsl()
           
 void releasePassivePort(int port)
          Release data port
 int requestPassivePort()
          Get passive data port.
 void setActiveEnabled(boolean activeEnabled)
          Set if active data connections are enabled
 void setActiveIpCheck(boolean activeIpCheck)
          Check the PORT IP with the client IP?
 void setActiveLocalAddress(java.lang.String activeLocalAddress)
          Set the active data connection local host.
 void setActiveLocalPort(int activeLocalPort)
          Set the active data connection local port.
 void setIdleTime(int idleTime)
          Set the maximum idle time in seconds.
 void setImplicitSsl(boolean implicitSsl)
          Set whether ssl is required for the data connection
 void setPassiveAddress(java.lang.String passiveAddress)
          Set the passive server address.
 void setPassiveExternalAddress(java.lang.String passiveExternalAddress)
          Set the passive address that will be returned to clients on the PASV command.
 void setPassivePorts(java.lang.String passivePorts)
          Set the passive ports to be used for data connections.
 void setSslConfiguration(SslConfiguration ssl)
          Set the SslConfiguration to be used by data connections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataConnectionConfigurationFactory

public DataConnectionConfigurationFactory()
Method Detail

createDataConnectionConfiguration

public DataConnectionConfiguration createDataConnectionConfiguration()
Create a DataConnectionConfiguration instance based on the configuration on this factory

Returns:
The DataConnectionConfiguration instance

getIdleTime

public int getIdleTime()
Get the maximum idle time in seconds.

Returns:
The maximum idle time

setIdleTime

public void setIdleTime(int idleTime)
Set the maximum idle time in seconds.

Parameters:
idleTime - The maximum idle time

isActiveEnabled

public boolean isActiveEnabled()
Is PORT enabled?

Returns:
true if active data connections are enabled

setActiveEnabled

public void setActiveEnabled(boolean activeEnabled)
Set if active data connections are enabled

Parameters:
activeEnabled - true if active data connections are enabled

isActiveIpCheck

public boolean isActiveIpCheck()
Check the PORT IP?

Returns:
true if the client IP is verified against the PORT IP

setActiveIpCheck

public void setActiveIpCheck(boolean activeIpCheck)
Check the PORT IP with the client IP?

Parameters:
activeIpCheck - true if the PORT IP should be verified

getActiveLocalAddress

public java.lang.String getActiveLocalAddress()
Get the local address for active mode data transfer.

Returns:
The address used for active data connections

setActiveLocalAddress

public void setActiveLocalAddress(java.lang.String activeLocalAddress)
Set the active data connection local host.

Parameters:
activeLocalAddress - The address for active connections

getActiveLocalPort

public int getActiveLocalPort()
Get the active local port number.

Returns:
The port used for active data connections

setActiveLocalPort

public void setActiveLocalPort(int activeLocalPort)
Set the active data connection local port.

Parameters:
activeLocalPort - The active data connection local port

getPassiveAddress

public java.lang.String getPassiveAddress()
Get passive host.

Returns:
The address used for passive data connections

setPassiveAddress

public void setPassiveAddress(java.lang.String passiveAddress)
Set the passive server address.

Parameters:
passiveAddress - The address used for passive connections

getPassiveExternalAddress

public java.lang.String getPassiveExternalAddress()
Get the passive address that will be returned to clients on the PASV command.

Returns:
The passive address to be returned to clients, null if not configured.

setPassiveExternalAddress

public void setPassiveExternalAddress(java.lang.String passiveExternalAddress)
Set the passive address that will be returned to clients on the PASV command.

Parameters:
passiveExternalAddress - The passive address to be returned to clients

requestPassivePort

public int requestPassivePort()
Get passive data port. Data port number zero (0) means that any available port will be used.

Returns:
A passive port to use

getPassivePorts

public java.lang.String getPassivePorts()
Retrieve the passive ports configured for this data connection

Returns:
The String of passive ports

setPassivePorts

public void setPassivePorts(java.lang.String passivePorts)
Set the passive ports to be used for data connections. Ports can be defined as single ports, closed or open ranges. Multiple definitions can be separated by commas, for example: Defaults to using any available port

Parameters:
passivePorts - The passive ports string

releasePassivePort

public void releasePassivePort(int port)
Release data port

Parameters:
port - The port to release

getSslConfiguration

public SslConfiguration getSslConfiguration()
Get the SslConfiguration to be used by data connections

Returns:
The SslConfiguration used by data connections

setSslConfiguration

public void setSslConfiguration(SslConfiguration ssl)
Set the SslConfiguration to be used by data connections

Parameters:
ssl - The SslConfiguration

isImplicitSsl

public boolean isImplicitSsl()
Returns:
True if ssl is mandatory for the data connection

setImplicitSsl

public void setImplicitSsl(boolean implicitSsl)
Set whether ssl is required for the data connection

Parameters:
sslMandatory - True if ssl is mandatory for the data connection


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.