|
||||||||||
| 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 SessionAcceptoraddress - the local addresspublic java.net.SocketAddress getListenAddress()
SessionAcceptor
getListenAddress in interface SessionAcceptorpublic void setListenPort(int port)
SessionAcceptor
setListenPort in interface SessionAcceptorport - the local portpublic int getListenPort()
SessionAcceptor
getListenPort in interface SessionAcceptorpublic int getBacklog()
SessionAcceptor
getBacklog in interface SessionAcceptorpublic void setBacklog(int backlog)
SessionAcceptor
setBacklog in interface SessionAcceptorbacklog - the maximum length of the queuepublic boolean isReuseAddress()
SessionAcceptor
isReuseAddress in interface SessionAcceptorpublic void setReuseAddress(boolean b)
SessionAcceptor
setReuseAddress in interface SessionAcceptorb - whether to enable or disable the socket optionpublic SessionAcceptorHandler getAcceptorHandler()
SessionAcceptor
getAcceptorHandler in interface SessionAcceptorpublic void setAcceptorHandler(SessionAcceptorHandler handler)
SessionAcceptor
setAcceptorHandler in interface SessionAcceptorhandler - session acceptor handler
protected 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.IOExceptionprotected 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 | |||||||||