|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ftpserver.listener.AbstractListener
org.apache.ftpserver.listener.nio.NioListener
public class NioListener
The default Listener
implementation.
Constructor Summary | |
---|---|
NioListener()
|
Method Summary | |
---|---|
java.util.Set<FtpIoSession> |
getActiveSessions()
Returns the currently active sessions for this listener. |
java.util.List<java.net.InetAddress> |
getBlockedAddresses()
Retrives the InetAddress for which this listener blocks connections |
java.util.List<org.apache.mina.filter.firewall.Subnet> |
getBlockedSubnets()
Retrives the Subnet s for which this acceptor blocks connections |
java.util.concurrent.ExecutorService |
getFilterExecutor()
Get the ExecutorService used for processing requests. |
FtpHandler |
getHandler()
|
int |
getIdleTimeout()
|
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 |
setBlockedAddresses(java.util.List<java.net.InetAddress> blockedAddresses)
Sets the InetAddress that this listener will block from connecting |
void |
setBlockedSubnets(java.util.List<org.apache.mina.filter.firewall.Subnet> blockedSubnets)
Sets the Subnet s that this listener will block from connecting |
void |
setFilterExecutor(java.util.concurrent.ExecutorService filterExecutor)
Set the ExecutorService used for processing requests |
void |
setHandler(FtpHandler handler)
|
void |
setIdleTimeout(int idleTimeout)
|
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.AbstractListener |
---|
getDataConnectionConfiguration, getPort, getServerAddress, getSslConfiguration, isImplicitSsl, setDataConnectionConfiguration, setImplicitSsl, setPort, setServerAddress, setSslConfiguration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NioListener()
Method Detail |
---|
public int getIdleTimeout()
public void setIdleTimeout(int idleTimeout)
public void start(FtpServerContext context) throws java.lang.Exception
Listener
java.lang.Exception
- On error during start upListener.start(FtpServerContext)
public void stop()
Listener
Listener.stop()
public boolean isStopped()
Listener
Listener.isStopped()
public boolean isSuspended()
Listener
Listener.isSuspended()
public void resume()
Listener
Listener.resume()
public void suspend()
Listener
Listener.resume()
method.
The method should not return until the listener has stopped
accepting socket requests.
Listener.suspend()
public java.util.concurrent.ExecutorService getFilterExecutor()
ExecutorService
used for processing requests. The default
value is a cached thread pool.
ExecutorService
public void setFilterExecutor(java.util.concurrent.ExecutorService filterExecutor)
ExecutorService
used for processing requests
filterExecutor
- The ExecutorService
public FtpHandler getHandler()
public void setHandler(FtpHandler handler)
public java.util.List<java.net.InetAddress> getBlockedAddresses()
InetAddress
for which this listener blocks connections
InetAddress
espublic void setBlockedAddresses(java.util.List<java.net.InetAddress> blockedAddresses)
InetAddress
that this listener will block from connecting
blockedAddresses
- The list of InetAddress
espublic java.util.List<org.apache.mina.filter.firewall.Subnet> getBlockedSubnets()
Subnet
s for which this acceptor blocks connections
Subnet
spublic void setBlockedSubnets(java.util.List<org.apache.mina.filter.firewall.Subnet> blockedSubnets)
Subnet
s that this listener will block from connecting
blockedAddresses
- The list of Subnet
spublic java.util.Set<FtpIoSession> getActiveSessions()
Listener
Set
would be returned.
Listener.getActiveSessions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |