ListenerEndpoint@Contract(threading=SAFE_CONDITIONAL) public class ListenerEndpointImpl extends java.lang.Object implements ListenerEndpoint
ListenerEndpoint.| Constructor | Description |
|---|---|
ListenerEndpointImpl(java.net.SocketAddress address,
ListenerEndpointClosedCallback callback) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
cancel() |
|
void |
close() |
Closes this endpoint.
|
void |
completed(java.net.SocketAddress address) |
|
void |
failed(java.io.IOException exception) |
|
java.net.SocketAddress |
getAddress() |
Returns the socket address of this endpoint.
|
java.io.IOException |
getException() |
Returns an instance of
IOException thrown during initialization
of this endpoint or null, if initialization was successful. |
boolean |
isClosed() |
Determines if this endpoint has been closed and is no longer listens
for incoming connections.
|
boolean |
isCompleted() |
|
protected void |
setKey(java.nio.channels.SelectionKey key) |
|
java.lang.String |
toString() |
|
void |
waitFor() |
Waits for completion of initialization process of this endpoint.
|
public ListenerEndpointImpl(java.net.SocketAddress address,
ListenerEndpointClosedCallback callback)
public java.net.SocketAddress getAddress()
ListenerEndpointgetAddress in interface ListenerEndpointpublic boolean isCompleted()
public java.io.IOException getException()
ListenerEndpointIOException thrown during initialization
of this endpoint or null, if initialization was successful.getException in interface ListenerEndpointnull.public void waitFor()
throws java.lang.InterruptedException
ListenerEndpointwaitFor in interface ListenerEndpointjava.lang.InterruptedException - in case the initialization process was
interrupted.public void completed(java.net.SocketAddress address)
public void failed(java.io.IOException exception)
public void cancel()
protected void setKey(java.nio.channels.SelectionKey key)
public boolean isClosed()
ListenerEndpointisClosed in interface ListenerEndpointtrue if the endpoint has been closed,
false otherwise.public void close()
ListenerEndpointclose in interface ListenerEndpointpublic java.lang.String toString()
toString in class java.lang.Object