public class ServerSocketAdapter extends ServerSocket
MultiplexSocketConnector to a
ServerSocket. That means that a socket connector, that
was previously created with a multiplex server socket, can be used as
a traditionnal server socket. This adapter can be useful when integrating
the multiplex module into existing code that rely on the ServerSocket
object.
Note that the following methods are not supported:
Calling any of these methods will result in an UnsupportedOperationException
beign thrown.
| Constructor and Description |
|---|
ServerSocketAdapter(MultiplexSocketConnector anInterceptor)
Creates a new ServerSocketAdapter instance.
|
| Modifier and Type | Method and Description |
|---|---|
Socket |
accept() |
void |
bind(SocketAddress endpoint) |
void |
bind(SocketAddress endpoint,
int backlog) |
void |
close() |
InetAddress |
getInetAddress() |
int |
getLocalPort() |
SocketAddress |
getLocalSocketAddress() |
int |
getReceiveBufferSize() |
boolean |
getReuseAddress() |
int |
getSoTimeout() |
boolean |
isBound() |
boolean |
isClosed() |
void |
setReceiveBufferSize(int size) |
void |
setReuseAddress(boolean on) |
void |
setSoTimeout(int timeout) |
getChannel, implAccept, setPerformancePreferences, setSocketFactory, toStringpublic ServerSocketAdapter(MultiplexSocketConnector anInterceptor) throws IOException
IOExceptionpublic void bind(SocketAddress endpoint) throws IOException
bind in class ServerSocketIOExceptionServerSocket.bind(java.net.SocketAddress)public void bind(SocketAddress endpoint, int backlog) throws IOException
bind in class ServerSocketIOExceptionServerSocket.bind(java.net.SocketAddress, int)public InetAddress getInetAddress()
getInetAddress in class ServerSocketServerSocket.getInetAddress()public int getLocalPort()
getLocalPort in class ServerSocketServerSocket.getLocalPort()public SocketAddress getLocalSocketAddress()
getLocalSocketAddress in class ServerSocketServerSocket.getLocalSocketAddress()public Socket accept() throws IOException
accept in class ServerSocketIOExceptionServerSocket.accept()public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ServerSocketIOExceptionServerSocket.close()public boolean isBound()
isBound in class ServerSocketServerSocket.isBound()public boolean isClosed()
isClosed in class ServerSocketServerSocket.isClosed()public void setSoTimeout(int timeout)
throws SocketException
setSoTimeout in class ServerSocketSocketExceptionServerSocket.setSoTimeout(int)public int getSoTimeout()
throws IOException
getSoTimeout in class ServerSocketIOExceptionServerSocket.getSoTimeout()public void setReuseAddress(boolean on)
throws SocketException
setReuseAddress in class ServerSocketSocketExceptionServerSocket.setReuseAddress(boolean)public boolean getReuseAddress()
throws SocketException
getReuseAddress in class ServerSocketSocketExceptionServerSocket.getReuseAddress()public void setReceiveBufferSize(int size)
throws SocketException
setReceiveBufferSize in class ServerSocketSocketExceptionServerSocket.setReceiveBufferSize(int)public int getReceiveBufferSize()
throws SocketException
getReceiveBufferSize in class ServerSocketSocketExceptionServerSocket.getReceiveBufferSize()Copyright © 2012 Sapia OSS. All Rights Reserved.