org.apache.ftpserver
Class DefaultDataConnectionConfiguration

java.lang.Object
  extended by org.apache.ftpserver.DefaultDataConnectionConfiguration
All Implemented Interfaces:
DataConnectionConfiguration

public class DefaultDataConnectionConfiguration
extends java.lang.Object
implements DataConnectionConfiguration

Data connection configuration.


Nested Class Summary
static class DefaultDataConnectionConfiguration.Active
           
static class DefaultDataConnectionConfiguration.Passive
           
 
Constructor Summary
DefaultDataConnectionConfiguration()
           
 
Method Summary
 java.net.InetAddress 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.net.InetAddress getPassiveAddress()
          Get passive host.
 java.net.InetAddress getPassiveExernalAddress()
          Get external passive host.
 java.lang.String getPassivePorts()
          Retrive the passive ports configured for this data connection
 SslConfiguration getSslConfiguration()
          Get SSL component.
 boolean isActiveEnabled()
          Is PORT enabled?
 boolean isActiveIpCheck()
          Check the PORT IP?
 void releasePassivePort(int port)
          Release data port
 int requestPassivePort()
          Get passive data port.
 void setActive(DefaultDataConnectionConfiguration.Active active)
           
 void setIdleTime(int idleTime)
           
 void setPassive(DefaultDataConnectionConfiguration.Passive passive)
           
 void setPassiveAddress(java.net.InetAddress address)
          Set the passive host
 void setPassiveExernalAddress(java.net.InetAddress address)
          Set the passive external host
 void setPassivePorts(java.lang.String passivePorts)
          Set the passive ports allowed for this data connection.
 void setSslConfiguration(SslConfiguration ssl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDataConnectionConfiguration

public DefaultDataConnectionConfiguration()
Method Detail

getIdleTime

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

Specified by:
getIdleTime in interface DataConnectionConfiguration

setIdleTime

public void setIdleTime(int idleTime)

setActive

public void setActive(DefaultDataConnectionConfiguration.Active active)

setPassive

public void setPassive(DefaultDataConnectionConfiguration.Passive passive)

setSslConfiguration

public void setSslConfiguration(SslConfiguration ssl)

isActiveEnabled

public boolean isActiveEnabled()
Is PORT enabled?

Specified by:
isActiveEnabled in interface DataConnectionConfiguration

isActiveIpCheck

public boolean isActiveIpCheck()
Check the PORT IP?

Specified by:
isActiveIpCheck in interface DataConnectionConfiguration

getActiveLocalAddress

public java.net.InetAddress getActiveLocalAddress()
Get the local address for active mode data transfer.

Specified by:
getActiveLocalAddress in interface DataConnectionConfiguration

getActiveLocalPort

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

Specified by:
getActiveLocalPort in interface DataConnectionConfiguration

getPassiveAddress

public java.net.InetAddress getPassiveAddress()
Get passive host.

Specified by:
getPassiveAddress in interface DataConnectionConfiguration

setPassiveAddress

public void setPassiveAddress(java.net.InetAddress address)
Set the passive host

Parameters:
address - The passive host

getPassiveExernalAddress

public java.net.InetAddress getPassiveExernalAddress()
Get external passive host.

Specified by:
getPassiveExernalAddress in interface DataConnectionConfiguration
Returns:
The passive address to be returned to clients, null if not configured.

setPassiveExernalAddress

public void setPassiveExernalAddress(java.net.InetAddress address)
Set the passive external host

Parameters:
address - The passive external host

requestPassivePort

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

Specified by:
requestPassivePort in interface DataConnectionConfiguration

getPassivePorts

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

Specified by:
getPassivePorts in interface DataConnectionConfiguration
Returns:
The String of passive ports

setPassivePorts

public void setPassivePorts(java.lang.String passivePorts)
Set the passive ports allowed for this data connection.

Specified by:
setPassivePorts in interface DataConnectionConfiguration
Parameters:
passivePorts - A string consisting of port numbers separated by commas. It can also include ranged. For example:

22,23,24

22-24,28

See Also:
for details on the allowed format. If set to null, the passive port with be assigned from any available port

releasePassivePort

public void releasePassivePort(int port)
Release data port

Specified by:
releasePassivePort in interface DataConnectionConfiguration

getSslConfiguration

public SslConfiguration getSslConfiguration()
Get SSL component.

Specified by:
getSslConfiguration in interface DataConnectionConfiguration


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.