|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.lddi.zwave.exporter.Server.AbstractSocketServer
public abstract class AbstractSocketServer
Abstract class with the basics of implementing a ISocketServer
.
Field Summary | |
---|---|
static int |
DEFAULT_TCP_BUFFERS_SIZE
SocketServer default size of the TCP buffers. |
protected int |
listenPort
Server listening port. |
protected int |
nWorkersCPUmultiplier
Number of worker threads to use for each available CPU. |
protected int |
nWorkersIO
Total number of worker threads. |
protected ISocketServerProtocolDecoderFactory |
protocolDecoderFactory
SocketServer protocolDecoderFactory. |
protected int |
tcpBufferSizeIn
Sockets buffer input size. |
protected int |
tcpBufferSizeOut
Sockets buffer output size. |
protected ThreadPoolExecutor |
workerPool
SocketServer workerPool. |
Constructor Summary | |
---|---|
AbstractSocketServer(ISocketServerProtocolDecoderFactory protocolFactory,
int listenPort)
Constructor. |
Method Summary | |
---|---|
void |
setPort(int port)
Sets the server listening port. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.universAAL.lddi.zwave.exporter.Server.ISocketServer |
---|
close, getTotalReadBytes, getTotalSentBytes, getTransferRateIn, getTransferRateOut, run, setIP, start |
Field Detail |
---|
public static int DEFAULT_TCP_BUFFERS_SIZE
protected int listenPort
protected int tcpBufferSizeIn
protected int tcpBufferSizeOut
protected int nWorkersCPUmultiplier
protected int nWorkersIO
protected ThreadPoolExecutor workerPool
protected ISocketServerProtocolDecoderFactory protocolDecoderFactory
Constructor Detail |
---|
public AbstractSocketServer(ISocketServerProtocolDecoderFactory protocolFactory, int listenPort)
protocolFactory
- protocol decoder factorylistenPort
- listening portMethod Detail |
---|
public void setPort(int port)
setPort
in interface ISocketServer
port
- the port numbersetPort
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |