|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.epam.common.transport.server.tcp.TCPServer
public class TCPServer
TCP server implementation.
Constructor Summary | |
---|---|
TCPServer()
Creates server with default port. |
|
TCPServer(int port)
Creates server. |
|
TCPServer(int port,
boolean enableNagle)
Creates server. |
|
TCPServer(int port,
boolean enableNagle,
String nic)
Creates server. |
Method Summary | |
---|---|
void |
setIncomingConnectionListener(ConnectionListener listener)
Sets the connection listener. |
void |
setPort(int port)
Sets port. |
void |
setServerSocketFactory(ServerSocketFactory serverSocketFactory)
Sets server socket factory. |
void |
start()
Start the server. |
void |
stop()
Stop server. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TCPServer()
public TCPServer(int port)
port
- - server portpublic TCPServer(int port, boolean enableNagle)
port
- - server portenableNagle
- - enable/disable nagle algorithmpublic TCPServer(int port, boolean enableNagle, String nic)
port
- - server portenableNagle
- - enable/disable nagle algorithmnic
- - specific connection addressMethod Detail |
---|
public void setServerSocketFactory(ServerSocketFactory serverSocketFactory)
serverSocketFactory
- - socket factorypublic void setPort(int port)
port
- public void setIncomingConnectionListener(ConnectionListener listener)
Server
setIncomingConnectionListener
in interface Server
listener
- the connection listenerServer.setIncomingConnectionListener(com.epam.common.transport.server.ConnectionListener)
public void start() throws IOException
Server
start
in interface Server
IOException
- - if error occurredServer.start()
public void stop() throws IOException
Server
stop
in interface Server
IOException
- - if error occurredServer.stop()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |