|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mirrormap.lifecycle.AbstractLifeCycle mirrormap.nio.TcpServer
public class TcpServer
A server that opens a TCP server socket and spawns
TcpConnectionEndPoint
instances to handle each of the client
connections.
Field Summary | |
---|---|
static String |
CONTEXT_RCV_BUFFER
The system property for overriding the default receive buffer size for the server port. |
static int |
DEFAULT_TCP_PORT
The default TCP port |
static String |
HOST_NAME
The host name |
Constructor Summary | |
---|---|
TcpServer(IConnectionEndPointReceiver.IFactory endPointReceiverFactory,
String address,
int port)
Construct the server with the factory that will create the IConnectionEndPointReceiver per client socket connection and the
server socket address and port |
Method Summary | |
---|---|
protected void |
doDestroy()
Overridden in subclasses to perform custom logic on destruction. |
protected void |
doStart()
Overridden in subclasses to perform custom logic on activation. |
String |
toString()
|
Methods inherited from class mirrormap.lifecycle.AbstractLifeCycle |
---|
checkActive, destroy, finalize, isActive, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String CONTEXT_RCV_BUFFER
public static final int DEFAULT_TCP_PORT
public static final String HOST_NAME
Constructor Detail |
---|
public TcpServer(IConnectionEndPointReceiver.IFactory endPointReceiverFactory, String address, int port)
IConnectionEndPointReceiver
per client socket connection and the
server socket address and port
endPointReceiverFactory
- the factory to create the IConnectionEndPointReceiver
for each client socketaddress
- the server socket address or host nameport
- the server socket TCP portMethod Detail |
---|
public String toString()
toString
in class AbstractLifeCycle
protected void doDestroy()
AbstractLifeCycle
RuntimeException
or subclass
thereof.
doDestroy
in class AbstractLifeCycle
protected void doStart()
AbstractLifeCycle
RuntimeException
or subclass
thereof. When this method is called, the AbstractLifeCycle.isActive()
method will
return true
.
doStart
in class AbstractLifeCycle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |