|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.maverick.nio.ProtocolContext
public abstract class ProtocolContext
A protocol context defines the behaviour for a listening interface.
| Field Summary | |
|---|---|
protected boolean |
keepAlive
|
protected int |
receiveBufferSize
|
protected boolean |
reuseAddress
|
protected int |
sendBufferSize
|
protected boolean |
tcpNoDelay
|
| Constructor Summary | |
|---|---|
ProtocolContext()
|
|
| Method Summary | |
|---|---|
SocketHandler |
createConnection(Daemon daemon)
Create a socket handler for this protocol. |
protected SocketHandler |
createConnectionImpl()
Creates a socket handler from the configured implementation class. |
protected abstract ProtocolEngine |
createEngine()
Create a protocol engine. |
int |
getReceiveBufferSize()
Get the socket receive buffer size. |
int |
getSendBufferSize()
Get the socket send buffer size. |
boolean |
getSocketOptionKeepAlive()
Indicates whether the SO_KEEPALIVE socket option is set on connected sockets. |
boolean |
getSocketOptionReuseAddress()
Indicates whether the SO_REUSEADDR socket option will be set on a server socket. |
boolean |
getSocketOptionTcpNoDelay()
Indicates whether the TCP_NODELAY socket option is set on connected sockets. |
void |
setReceiveBufferSize(int receiveBufferSize)
Set the receive buffer size for sockets. |
void |
setSendBufferSize(int sendBufferSize)
Set the send buffer size for sockets. |
void |
setSocketHandlerImpl(java.lang.Class socketConnectionImpl)
Sets the socket handler implementation class for this context. |
void |
setSocketOptionKeepAlive(boolean keepAlive)
Set the SO_KEEPALIVE socket option on connected sockets. |
void |
setSocketOptionReuseAddress(boolean reuseAddress)
Indicates whether the SO_REUSEADDR socket option will be set on a server socket. |
void |
setSocketOptionTcpNoDelay(boolean tcpNoDelay)
Set the TCP_NODELAY socket option on connected sockets. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean keepAlive
protected boolean tcpNoDelay
protected boolean reuseAddress
protected int receiveBufferSize
protected int sendBufferSize
| Constructor Detail |
|---|
public ProtocolContext()
| Method Detail |
|---|
public SocketHandler createConnection(Daemon daemon)
throws java.io.IOException
daemon - Daemon
java.io.IOException
protected abstract ProtocolEngine createEngine()
throws java.io.IOException
java.io.IOExceptionpublic boolean getSocketOptionKeepAlive()
public boolean getSocketOptionReuseAddress()
public void setSocketOptionReuseAddress(boolean reuseAddress)
reuseAddress - boolean
public void setSocketHandlerImpl(java.lang.Class socketConnectionImpl)
throws java.io.IOException
socketConnectionImpl - Class
java.io.IOException
protected SocketHandler createConnectionImpl()
throws java.io.IOException
java.io.IOExceptionpublic void setSocketOptionKeepAlive(boolean keepAlive)
keepAlive - booleanpublic boolean getSocketOptionTcpNoDelay()
public void setSocketOptionTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay - booleanpublic void setReceiveBufferSize(int receiveBufferSize)
receiveBufferSize - intpublic void setSendBufferSize(int sendBufferSize)
sendBufferSize - intpublic int getReceiveBufferSize()
public int getSendBufferSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||