org.apache.ftpserver.listener.nio
Class NioListener

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

public class NioListener
extends AbstractListener

Internal class, do not use directly. The default Listener implementation.

Version:
$Rev$, $Date$
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
NioListener(java.lang.String serverAddress, int port, boolean implicitSsl, SslConfiguration sslConfiguration, DataConnectionConfiguration dataConnectionConfig, int idleTimeout, java.util.List<java.net.InetAddress> blockedAddresses, java.util.List<org.apache.mina.filter.firewall.Subnet> blockedSubnets)
          Constructor for internal use, do not use directly.
 
Method Summary
 java.util.Set<FtpIoSession> getActiveSessions()
          Returns the currently active sessions for this listener.
 boolean isStopped()
          Checks if the listener is currently started.
 boolean isSuspended()
          Checks if the listener is currently suspended
 void resume()
          Resumes a suspended listener.
 void start(FtpServerContext context)
          Start the listener, will initiate the listener waiting on the socket.
 void stop()
          Stop the listener, it should no longer except socket requests.
 void suspend()
          Temporarily stops the listener from accepting socket requests.
 
Methods inherited from class org.apache.ftpserver.listener.nio.AbstractListener
getBlockedAddresses, getBlockedSubnets, getDataConnectionConfiguration, getIdleTimeout, getPort, getServerAddress, getSslConfiguration, isImplicitSsl, setPort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NioListener

public NioListener(java.lang.String serverAddress,
                   int port,
                   boolean implicitSsl,
                   SslConfiguration sslConfiguration,
                   DataConnectionConfiguration dataConnectionConfig,
                   int idleTimeout,
                   java.util.List<java.net.InetAddress> blockedAddresses,
                   java.util.List<org.apache.mina.filter.firewall.Subnet> blockedSubnets)
Constructor for internal use, do not use directly. Instead use ListenerFactory

Method Detail

start

public void start(FtpServerContext context)
Description copied from interface: Listener
Start the listener, will initiate the listener waiting on the socket. The method should not return until the listener has started accepting socket requests.

Parameters:
context - The current FtpServerContext
See Also:
Listener.start(FtpServerContext)

stop

public void stop()
Description copied from interface: Listener
Stop the listener, it should no longer except socket requests. The method should not return until the listener has stopped accepting socket requests.

See Also:
Listener.stop()

isStopped

public boolean isStopped()
Description copied from interface: Listener
Checks if the listener is currently started.

Returns:
True if the listener is started
See Also:
Listener.isStopped()

isSuspended

public boolean isSuspended()
Description copied from interface: Listener
Checks if the listener is currently suspended

Returns:
True if the listener is suspended
See Also:
Listener.isSuspended()

resume

public void resume()
Description copied from interface: Listener
Resumes a suspended listener. The method should not return until the listener has started accepting socket requests.

See Also:
Listener.resume()

suspend

public void suspend()
Description copied from interface: Listener
Temporarily stops the listener from accepting socket requests. Resume the listener by using the Listener.resume() method. The method should not return until the listener has stopped accepting socket requests.

See Also:
Listener.suspend()

getActiveSessions

public java.util.Set<FtpIoSession> getActiveSessions()
Description copied from interface: Listener
Returns the currently active sessions for this listener. If no sessions are active, an empty Set would be returned.

Returns:
The currently active sessions
See Also:
Listener.getActiveSessions()


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