@Contract(threading=SAFE_CONDITIONAL) public class ListenerEndpointImpl extends Object implements ListenerEndpoint
ListenerEndpoint.| Constructor and Description |
|---|
ListenerEndpointImpl(SocketAddress address,
ListenerEndpointClosedCallback callback) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
void |
close()
Closes this endpoint.
|
void |
completed(SocketAddress address) |
void |
failed(IOException exception) |
SocketAddress |
getAddress()
Returns the socket address of this endpoint.
|
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(SelectionKey key) |
String |
toString() |
void |
waitFor()
Waits for completion of initialization process of this endpoint.
|
public ListenerEndpointImpl(SocketAddress address, ListenerEndpointClosedCallback callback)
public SocketAddress getAddress()
ListenerEndpointgetAddress in interface ListenerEndpointpublic boolean isCompleted()
public IOException getException()
ListenerEndpointIOException thrown during initialization
of this endpoint or null, if initialization was successful.getException in interface ListenerEndpointnull.public void waitFor()
throws InterruptedException
ListenerEndpointwaitFor in interface ListenerEndpointInterruptedException - in case the initialization process was
interrupted.public void completed(SocketAddress address)
public void failed(IOException exception)
public void cancel()
protected void setKey(SelectionKey key)
public boolean isClosed()
ListenerEndpointisClosed in interface ListenerEndpointtrue if the endpoint has been closed,
false otherwise.public void close()
ListenerEndpointclose in interface ListenerEndpointCopyright © 2005–2022 The Apache Software Foundation. All rights reserved.