|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cindy.session.AbstractSessionAcceptor
public abstract class AbstractSessionAcceptor
Abstract session acceptor.
Constructor Summary | |
---|---|
AbstractSessionAcceptor()
|
Method Summary | |
---|---|
protected void |
exceptionCaught(java.lang.Throwable e)
|
SessionAcceptorHandler |
getAcceptorHandler()
Get the acceptor handler associated with this acceptor. |
int |
getBacklog()
Get the maximum queue length for incoming connection. |
java.net.SocketAddress |
getListenAddress()
Get the listen address which the accpetor bind with. |
int |
getListenPort()
Get the listen port which the acceptor bind with. |
boolean |
isReuseAddress()
Tests if SO_REUSEADDR is enabled. |
protected void |
sessionAccepted(Session session)
|
void |
setAcceptorHandler(SessionAcceptorHandler handler)
Set the acceptor handler associated with this acceptor. |
void |
setBacklog(int backlog)
Set the maximum queue length for incoming connection. |
void |
setListenAddress(java.net.SocketAddress address)
Set the listen address which the acceptor bind with. |
void |
setListenPort(int port)
Set the listen port which the acceptor bind with. |
void |
setReuseAddress(boolean b)
Enable/disable the SO_REUSEADDR socket option. |
protected void |
setServerSocketOptions(java.net.ServerSocket socket)
|
protected void |
setSocketOptions(java.net.Socket socket)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.cindy.SessionAcceptor |
---|
close, getAcceptedCount, getSessionType, isStarted, start |
Constructor Detail |
---|
public AbstractSessionAcceptor()
Method Detail |
---|
public void setListenAddress(java.net.SocketAddress address)
SessionAcceptor
setListenAddress
in interface SessionAcceptor
address
- the local addresspublic java.net.SocketAddress getListenAddress()
SessionAcceptor
getListenAddress
in interface SessionAcceptor
public void setListenPort(int port)
SessionAcceptor
setListenPort
in interface SessionAcceptor
port
- the local portpublic int getListenPort()
SessionAcceptor
getListenPort
in interface SessionAcceptor
public int getBacklog()
SessionAcceptor
getBacklog
in interface SessionAcceptor
public void setBacklog(int backlog)
SessionAcceptor
setBacklog
in interface SessionAcceptor
backlog
- the maximum length of the queuepublic boolean isReuseAddress()
SessionAcceptor
isReuseAddress
in interface SessionAcceptor
public void setReuseAddress(boolean b)
SessionAcceptor
setReuseAddress
in interface SessionAcceptor
b
- whether to enable or disable the socket optionpublic SessionAcceptorHandler getAcceptorHandler()
SessionAcceptor
getAcceptorHandler
in interface SessionAcceptor
public void setAcceptorHandler(SessionAcceptorHandler handler)
SessionAcceptor
setAcceptorHandler
in interface SessionAcceptor
handler
- session acceptor handlerprotected void setSocketOptions(java.net.Socket socket) throws java.io.IOException
java.io.IOException
protected void setServerSocketOptions(java.net.ServerSocket socket) throws java.io.IOException
java.io.IOException
protected final void exceptionCaught(java.lang.Throwable e)
protected final void sessionAccepted(Session session)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |