Class Server
java.lang.Object
java.net.ServerSocket
org.eclipse.ecf.provider.comm.tcp.Server
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServer
(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 Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
protected void
handleAccept
(Socket aSocket) protected Thread
protected void
traceStack
(String msg, Throwable e) Methods inherited from class java.net.ServerSocket
accept, bind, bind, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getOption, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setOption, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, supportedOptions, toString
-
Field Details
-
DEFAULT_BACKLOG
public static final int DEFAULT_BACKLOG- See Also:
-
-
Constructor Details
-
Server
public Server(ThreadGroup group, int port, int backlog, InetAddress bindAddress, ISocketAcceptHandler handler) throws IOException - Parameters:
group
- thread group for created threadsport
- portbacklog
- backlogbindAddress
- a bindAddresshandler
- the socket accept handler- Throws:
IOException
- if server setup cannot be done- Since:
- 4.4
-
Server
public Server(ThreadGroup group, int port, InetAddress bindAddress, ISocketAcceptHandler handler) throws IOException - Parameters:
group
- thread group for created threadsport
- portbindAddress
- a bindAddresshandler
- the socket accept handler- Throws:
IOException
- if server setup cannot be done- Since:
- 4.4
-
Server
public Server(ThreadGroup group, int port, int backlog, ISocketAcceptHandler handler) throws IOException - Parameters:
group
- thread group for created threadsport
- portbacklog
- backloghandler
- the socket accept handler- Throws:
IOException
- if server setup cannot be done- Since:
- 4.4
-
Server
- Throws:
IOException
-
Server
- Throws:
IOException
-
-
Method Details
-
debug
-
traceStack
-
setupListener
-
handleAccept
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classServerSocket
- Throws:
IOException
-