|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.net.mplex.SocketConnectorImpl
public class SocketConnectorImpl
Class documentation
| Constructor Summary | |
|---|---|
SocketConnectorImpl(MultiplexServerSocket aServerSocket,
StreamSelector aSelector,
SocketQueue aQueue)
Creates a new SocketConnectorImpl instance. |
|
| Method Summary | |
|---|---|
java.net.Socket |
accept()
Listens for a connection to be made to this socket and accepts it. |
void |
close()
Closes this multiplex socket handler. |
java.net.InetAddress |
getInetAddress()
Returns the local address of this server socket. |
int |
getLocalPort()
Returns the port on which this socket is listening. |
java.net.SocketAddress |
getLocalSocketAddress()
Returns the address of the endpoint this socket is bound to, or null if it is not bound yet. |
SocketQueue |
getQueue()
Returns the socket queue of this handler. |
int |
getReceiveBufferSize()
Gets the value of the SO_RCVBUF option for this socket interceptor that is the proposed buffer size that will be used for Sockets accepted from this socket interceptor. |
boolean |
getReuseAddress()
Tests if SO_REUSEADDR is enabled. |
StreamSelector |
getSelector()
Returns the selector associated to this handler. |
int |
getSoTimeout()
(i.e., timeout of infinity). |
boolean |
isBound()
Returns the binding state of the socket. |
boolean |
isClosed()
Returns the closed state of the socket. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocketConnectorImpl(MultiplexServerSocket aServerSocket,
StreamSelector aSelector,
SocketQueue aQueue)
| Method Detail |
|---|
public StreamSelector getSelector()
public SocketQueue getQueue()
public int getLocalPort()
getLocalPort in interface MultiplexSocketConnectorpublic java.net.InetAddress getInetAddress()
getInetAddress in interface MultiplexSocketConnectornull if the socket is unbound.public java.net.SocketAddress getLocalSocketAddress()
null if it is not bound yet.
getLocalSocketAddress in interface MultiplexSocketConnectorSocketAddress representing the local endpoint of this
socket, or null if it is not bound yet.
public int getReceiveBufferSize()
throws java.net.SocketException
getReceiveBufferSize in interface MultiplexSocketConnectorjava.net.SocketException - if there is an error in the underlying protocol.
public boolean getReuseAddress()
throws java.net.SocketException
getReuseAddress in interface MultiplexSocketConnectorboolean indicating whether or not SO_REUSEADDR is enabled.
java.net.SocketException - if there is an error in the underlying protocol.
public int getSoTimeout()
throws java.io.IOException
getSoTimeout in interface MultiplexSocketConnectorjava.io.IOException - if an I/O error occurspublic boolean isBound()
isBound in interface MultiplexSocketConnectorpublic boolean isClosed()
isClosed in interface MultiplexSocketConnector
public java.net.Socket accept()
throws java.io.IOException
accept in interface MultiplexSocketConnectorjava.io.IOException - If an I/O error occurs when waiting for a connection.
public void close()
throws java.io.IOException
close in interface MultiplexSocketConnectorjava.io.IOException - if an I/O error occurs when closing the socket.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||