|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SessionAcceptor
Session acceptor, accept incoming sessions.
| Method Summary | |
|---|---|
void |
close()
Close acceptor. |
int |
getAcceptedCount()
Get accepted session count. |
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. |
SessionType |
getSessionType()
Get the session type of the session accepted by the acceptor. |
boolean |
isReuseAddress()
Tests if SO_REUSEADDR is enabled. |
boolean |
isStarted()
Acceptor is started. |
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. |
void |
start()
Start acceptor. |
| Method Detail |
|---|
SessionType getSessionType()
SessionAcceptorHandler getAcceptorHandler()
void setAcceptorHandler(SessionAcceptorHandler handler)
handler - session acceptor handlervoid setListenAddress(java.net.SocketAddress address)
address - the local address
java.lang.IllegalStateExceptionjava.net.SocketAddress getListenAddress()
void setListenPort(int port)
port - the local port
java.lang.IllegalStateExceptionint getListenPort()
void setBacklog(int backlog)
backlog - the maximum length of the queueint getBacklog()
void setReuseAddress(boolean b)
b - whether to enable or disable the socket optionboolean isReuseAddress()
boolean isStarted()
void start()
java.lang.IllegalStateExceptionvoid close()
int getAcceptedCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||