Class Server
- java.lang.Object
- 
- java.net.ServerSocket
- 
- org.eclipse.ecf.provider.comm.tcp.Server
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable
 
 public class Server extends ServerSocket 
- 
- 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_BACKLOG
 - 
Constructor SummaryConstructors Constructor Description Server(int port, ISocketAcceptHandler handler)Server(ThreadGroup group, int port, int backlog, InetAddress bindAddress, ISocketAcceptHandler handler)Server(ThreadGroup group, int port, int backlog, ISocketAcceptHandler handler)Server(ThreadGroup group, int port, InetAddress bindAddress, ISocketAcceptHandler handler)Server(ThreadGroup group, int port, ISocketAcceptHandler handler)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected voiddebug(String msg)protected voidhandleAccept(Socket aSocket)protected ThreadsetupListener()protected voidtraceStack(String msg, Throwable e)- 
Methods inherited from class java.net.ServerSocketaccept, bind, bind, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getOption, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setOption, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, supportedOptions, toString
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_BACKLOGpublic static final int DEFAULT_BACKLOG - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
Serverpublic Server(ThreadGroup group, int port, int backlog, InetAddress bindAddress, ISocketAcceptHandler handler) throws IOException - Parameters:
- group- thread group for created threads
- port- port
- backlog- backlog
- bindAddress- a bindAddress
- handler- the socket accept handler
- Throws:
- IOException- if server setup cannot be done
- Since:
- 4.4
 
 - 
Serverpublic Server(ThreadGroup group, int port, InetAddress bindAddress, ISocketAcceptHandler handler) throws IOException - Parameters:
- group- thread group for created threads
- port- port
- bindAddress- a bindAddress
- handler- the socket accept handler
- Throws:
- IOException- if server setup cannot be done
- Since:
- 4.4
 
 - 
Serverpublic Server(ThreadGroup group, int port, int backlog, ISocketAcceptHandler handler) throws IOException - Parameters:
- group- thread group for created threads
- port- port
- backlog- backlog
- handler- the socket accept handler
- Throws:
- IOException- if server setup cannot be done
- Since:
- 4.4
 
 - 
Serverpublic Server(ThreadGroup group, int port, ISocketAcceptHandler handler) throws IOException - Throws:
- IOException
 
 - 
Serverpublic Server(int port, ISocketAcceptHandler handler) throws IOException- Throws:
- IOException
 
 
- 
 - 
Method Detail- 
debugprotected void debug(String msg) 
 - 
setupListenerprotected Thread setupListener() 
 - 
handleAcceptprotected void handleAccept(Socket aSocket) 
 - 
closepublic void close() throws IOException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- ServerSocket
- Throws:
- IOException
 
 
- 
 
-