net.sf.cindy.session.nio
Class NonBlockingSessionAcceptor

java.lang.Object
  extended by net.sf.cindy.session.AbstractSessionAcceptor
      extended by net.sf.cindy.session.nio.NonBlockingSessionAcceptor
All Implemented Interfaces:
SessionAcceptor

public class NonBlockingSessionAcceptor
extends AbstractSessionAcceptor

Non-blocking session acceptor.

Version:
$id$
Author:
Roger Chen

Constructor Summary
NonBlockingSessionAcceptor()
           
 
Method Summary
 void close()
          Close acceptor.
 int getAcceptedCount()
          Get accepted session count.
 java.net.SocketAddress getListenAddress()
          Get the listen address which the accpetor bind with.
 int getListenPort()
          Get the listen port which the acceptor bind with.
 SessionType getSessionType()
          Get the session type of the session accepted by the acceptor.
 boolean isStarted()
          Acceptor is started.
 void start()
          Start acceptor.
 
Methods inherited from class net.sf.cindy.session.AbstractSessionAcceptor
exceptionCaught, getAcceptorHandler, getBacklog, isReuseAddress, sessionAccepted, setAcceptorHandler, setBacklog, setListenAddress, setListenPort, setReuseAddress, setServerSocketOptions, setSocketOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonBlockingSessionAcceptor

public NonBlockingSessionAcceptor()
Method Detail

getSessionType

public SessionType getSessionType()
Description copied from interface: SessionAcceptor
Get the session type of the session accepted by the acceptor.

Returns:
session type

isStarted

public boolean isStarted()
Description copied from interface: SessionAcceptor
Acceptor is started.

Returns:
is started

getListenAddress

public java.net.SocketAddress getListenAddress()
Description copied from interface: SessionAcceptor
Get the listen address which the accpetor bind with.

Specified by:
getListenAddress in interface SessionAcceptor
Overrides:
getListenAddress in class AbstractSessionAcceptor
Returns:
the local address

getListenPort

public int getListenPort()
Description copied from interface: SessionAcceptor
Get the listen port which the acceptor bind with.

Specified by:
getListenPort in interface SessionAcceptor
Overrides:
getListenPort in class AbstractSessionAcceptor
Returns:
the local port

start

public void start()
Description copied from interface: SessionAcceptor
Start acceptor.


getAcceptedCount

public int getAcceptedCount()
Description copied from interface: SessionAcceptor
Get accepted session count.

Returns:
accepted session count

close

public void close()
Description copied from interface: SessionAcceptor
Close acceptor.