Package org.apache.hc.core5.reactor
Class ListenerEndpointImpl
java.lang.Object
org.apache.hc.core5.reactor.ListenerEndpointImpl
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ModalCloseable
,ListenerEndpoint
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final SocketAddress
(package private) final Object
private final AtomicBoolean
private final SelectionKey
-
Constructor Summary
ConstructorsConstructorDescriptionListenerEndpointImpl
(SelectionKey key, Object attachment, SocketAddress address) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
Closes this process or endpoint and releases any system resources associated with it.Returns the socket address of this endpoint.boolean
isClosed()
Determines if this endpoint has been closed and is no longer listens for incoming connections.toString()
-
Field Details
-
key
-
address
-
attachment
-
closed
-
-
Constructor Details
-
ListenerEndpointImpl
-
-
Method Details
-
getAddress
Description copied from interface:ListenerEndpoint
Returns the socket address of this endpoint.- Specified by:
getAddress
in interfaceListenerEndpoint
- Returns:
- socket address.
-
toString
-
isClosed
public boolean isClosed()Description copied from interface:ListenerEndpoint
Determines if this endpoint has been closed and is no longer listens for incoming connections.- Specified by:
isClosed
in interfaceListenerEndpoint
- Returns:
true
if the endpoint has been closed,false
otherwise.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
close
Description copied from interface:ModalCloseable
Closes this process or endpoint and releases any system resources associated with it. If the endpoint or the process is already closed then invoking this method has no effect.- Specified by:
close
in interfaceModalCloseable
- Parameters:
closeMode
- How to close the receiver.
-