org.apache.ftpserver.listener
Class AbstractListener

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

public abstract class AbstractListener
extends java.lang.Object
implements Listener

Common base class for listener implementations


Constructor Summary
AbstractListener()
           
 
Method Summary
 DataConnectionConfiguration getDataConnectionConfiguration()
          Get configuration for data connections made within this listener
 int getPort()
          Get the port on which this listener is waiting for requests.
 java.net.InetAddress 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
 void setDataConnectionConfiguration(DataConnectionConfiguration dataConnectionConfig)
          Set configuration for data connections made within this listener
 void setImplicitSsl(boolean implicitSsl)
          Should this listener be in SSL mode automatically or must the client explicitly request to use SSL
 void setPort(int port)
          Set the port on which this listener will accept requests.
 void setServerAddress(java.net.InetAddress serverAddress)
          Set the InetAddress used for binding the local socket.
 void setSslConfiguration(SslConfiguration ssl)
          Set the SslConfiguration used for this listener
 
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

public AbstractListener()
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

setImplicitSsl

public void setImplicitSsl(boolean implicitSsl)
Should this listener be in SSL mode automatically or must the client explicitly request to use SSL

Specified by:
setImplicitSsl in interface Listener
Parameters:
implicitSsl - true is the listener should automatically be 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

public void setPort(int port)
Set the port on which this listener will accept requests. Or set to 0 (zero) is the port should be automatically assigned

Specified by:
setPort in interface Listener
Parameters:
port - The port to use.

getServerAddress

public java.net.InetAddress 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

setServerAddress

public void setServerAddress(java.net.InetAddress serverAddress)
Set the InetAddress used for binding the local socket. Defaults to null, that is, the server binds to all available network interfaces

Specified by:
setServerAddress in interface Listener
Parameters:
serverAddress - The local socket InetAddress

getSslConfiguration

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

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

setSslConfiguration

public void setSslConfiguration(SslConfiguration ssl)
Set the SslConfiguration used for this listener

Specified by:
setSslConfiguration in interface Listener
Parameters:
ssl - The 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

setDataConnectionConfiguration

public void setDataConnectionConfiguration(DataConnectionConfiguration dataConnectionConfig)
Set configuration for data connections made within this listener

Specified by:
setDataConnectionConfiguration in interface Listener
Parameters:
dataConnectionConfig - The data connection configuration


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