@ThreadSafe public class ListenerEndpointImpl extends java.lang.Object implements ListenerEndpoint
ListenerEndpoint.| 构造器和说明 |
|---|
ListenerEndpointImpl(java.net.SocketAddress address,
ListenerEndpointClosedCallback callback) |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
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 在接口中 ListenerEndpointpublic boolean isCompleted()
public java.io.IOException getException()
ListenerEndpointIOException thrown during initialization
of this endpoint or null, if initialization was successful.getException 在接口中 ListenerEndpointnull.public void waitFor()
throws java.lang.InterruptedException
ListenerEndpointwaitFor 在接口中 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 在接口中 ListenerEndpointtrue if the endpoint has been closed,
false otherwise.public void close()
ListenerEndpointclose 在接口中 ListenerEndpoint