org.apache.ftpserver.listener.nio
Class AbstractListener

java.lang.Object
  extended by org.apache.ftpserver.listener.nio.AbstractListener
All Implemented Interfaces:
Listener
Direct Known Subclasses:
NioListener

public abstract class AbstractListener
extends Object
implements Listener

Internal class, do not use directly. Common base class for listener implementations

Author:
Apache MINA Project

Constructor Summary
AbstractListener(String serverAddress, int port, boolean implicitSsl, SslConfiguration sslConfiguration, DataConnectionConfiguration dataConnectionConfig, int idleTimeout, IpFilter ipFilter)
          Constructor for internal use, do not use directly.
AbstractListener(String serverAddress, int port, boolean implicitSsl, SslConfiguration sslConfiguration, DataConnectionConfiguration dataConnectionConfig, int idleTimeout, List<InetAddress> blockedAddresses, List<org.apache.mina.filter.firewall.Subnet> blockedSubnets)
          Deprecated. Use the constructor with IpFilter instead. Constructor for internal use, do not use directly. Instead use ListenerFactory
 
Method Summary
 List<InetAddress> getBlockedAddresses()
          Retrives the InetAddress for which this listener blocks connections
 List<org.apache.mina.filter.firewall.Subnet> getBlockedSubnets()
          Retrieves the Subnets for this listener blocks connections
 DataConnectionConfiguration getDataConnectionConfiguration()
          Get configuration for data connections made within this listener
 int getIdleTimeout()
          Get the number of seconds during which no network activity is allowed before a session is closed due to inactivity.
 IpFilter getIpFilter()
          Returns the IP filter associated with this listener.
 int getPort()
          Get the port on which this listener is waiting for requests.
 String getServerAddress()
          Get the InetAddress used for binding the local socket.
 SslConfiguration getSslConfiguration()
          Get the SslConfiguration used for this listener
 boolean isImplicitSsl()
          Is this listener in SSL mode automatically or must the client explicitly request to use SSL
protected  void setPort(int port)
          Used internally to update the port after binding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.ftpserver.listener.Listener
getActiveSessions, isStopped, isSuspended, resume, start, stop, suspend
 

Constructor Detail

AbstractListener

@Deprecated
public AbstractListener(String serverAddress,
                                   int port,
                                   boolean implicitSsl,
                                   SslConfiguration sslConfiguration,
                                   DataConnectionConfiguration dataConnectionConfig,
                                   int idleTimeout,
                                   List<InetAddress> blockedAddresses,
                                   List<org.apache.mina.filter.firewall.Subnet> blockedSubnets)
Deprecated. Use the constructor with IpFilter instead. Constructor for internal use, do not use directly. Instead use ListenerFactory


AbstractListener

public AbstractListener(String serverAddress,
                        int port,
                        boolean implicitSsl,
                        SslConfiguration sslConfiguration,
                        DataConnectionConfiguration dataConnectionConfig,
                        int idleTimeout,
                        IpFilter ipFilter)
Constructor for internal use, do not use directly. Instead use ListenerFactory

Method Detail

isImplicitSsl

public boolean isImplicitSsl()
Is this listener in SSL mode automatically or must the client explicitly request to use SSL

Specified by:
isImplicitSsl in interface Listener
Returns:
true is the listener is automatically in SSL mode, false otherwise

getPort

public int getPort()
Get the port on which this listener is waiting for requests. For listeners where the port is automatically assigned, this will return the bound port.

Specified by:
getPort in interface Listener
Returns:
The port

setPort

protected void setPort(int port)
Used internally to update the port after binding

Parameters:
port -

getServerAddress

public String getServerAddress()
Get the InetAddress used for binding the local socket. Defaults to null, that is, the server binds to all available network interfaces

Specified by:
getServerAddress in interface Listener
Returns:
The local socket InetAddress, if set

getSslConfiguration

public SslConfiguration getSslConfiguration()
Get the SslConfiguration used for this listener

Specified by:
getSslConfiguration in interface Listener
Returns:
The current SslConfiguration

getDataConnectionConfiguration

public DataConnectionConfiguration getDataConnectionConfiguration()
Get configuration for data connections made within this listener

Specified by:
getDataConnectionConfiguration in interface Listener
Returns:
The data connection configuration

getIdleTimeout

public int getIdleTimeout()
Get the number of seconds during which no network activity is allowed before a session is closed due to inactivity.

Specified by:
getIdleTimeout in interface Listener
Returns:
The idle time out

getBlockedAddresses

public List<InetAddress> getBlockedAddresses()
Retrives the InetAddress for which this listener blocks connections

Specified by:
getBlockedAddresses in interface Listener
Returns:
The list of InetAddresses

getBlockedSubnets

public List<org.apache.mina.filter.firewall.Subnet> getBlockedSubnets()
Retrieves the Subnets for this listener blocks connections

Specified by:
getBlockedSubnets in interface Listener
Returns:
The list of Subnets

getIpFilter

public IpFilter getIpFilter()
Description copied from interface: Listener
Returns the IP filter associated with this listener. May return null.

Specified by:
getIpFilter in interface Listener
Returns:
the IP filter associated with this listener. May return null.


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