Package org.apache.http.impl.nio.reactor
Class ListenerEndpointImpl
java.lang.Object
org.apache.http.impl.nio.reactor.ListenerEndpointImpl
- All Implemented Interfaces:
ListenerEndpoint
@Contract(threading=SAFE_CONDITIONAL)
public class ListenerEndpointImpl
extends Object
implements ListenerEndpoint
Default implementation of
ListenerEndpoint.- Since:
- 4.0
-
Constructor Summary
ConstructorsConstructorDescriptionListenerEndpointImpl(SocketAddress address, ListenerEndpointClosedCallback callback) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()voidclose()Closes this endpoint.voidcompleted(SocketAddress address) voidfailed(IOException exception) Returns the socket address of this endpoint.Returns an instance ofIOExceptionthrown during initialization of this endpoint ornull, if initialization was successful.booleanisClosed()Determines if this endpoint has been closed and is no longer listens for incoming connections.booleantoString()voidwaitFor()Waits for completion of initialization process of this endpoint.
-
Constructor Details
-
ListenerEndpointImpl
-
-
Method Details
-
getAddress
Description copied from interface:ListenerEndpointReturns the socket address of this endpoint.- Specified by:
getAddressin interfaceListenerEndpoint- Returns:
- socket address.
-
isCompleted
public boolean isCompleted() -
getException
Description copied from interface:ListenerEndpointReturns an instance ofIOExceptionthrown during initialization of this endpoint ornull, if initialization was successful.- Specified by:
getExceptionin interfaceListenerEndpoint- Returns:
- I/O exception object or
null.
-
waitFor
Description copied from interface:ListenerEndpointWaits for completion of initialization process of this endpoint.- Specified by:
waitForin interfaceListenerEndpoint- Throws:
InterruptedException- in case the initialization process was interrupted.
-
completed
-
failed
-
cancel
public void cancel() -
isClosed
public boolean isClosed()Description copied from interface:ListenerEndpointDetermines if this endpoint has been closed and is no longer listens for incoming connections.- Specified by:
isClosedin interfaceListenerEndpoint- Returns:
trueif the endpoint has been closed,falseotherwise.
-
close
public void close()Description copied from interface:ListenerEndpointCloses this endpoint. The endpoint will stop accepting incoming connection.- Specified by:
closein interfaceListenerEndpoint
-
toString
-