Package org.apache.hc.core5.reactor
Class ListenerEndpointImpl
- java.lang.Object
-
- org.apache.hc.core5.reactor.ListenerEndpointImpl
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,ModalCloseable,ListenerEndpoint
class ListenerEndpointImpl extends java.lang.Object implements ListenerEndpoint
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.net.SocketAddressaddress(package private) java.lang.Objectattachmentprivate java.util.concurrent.atomic.AtomicBooleanclosedprivate java.nio.channels.SelectionKeykey
-
Constructor Summary
Constructors Constructor Description ListenerEndpointImpl(java.nio.channels.SelectionKey key, java.lang.Object attachment, java.net.SocketAddress address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidclose(CloseMode closeMode)Closes this process or endpoint and releases any system resources associated with it.java.net.SocketAddressgetAddress()Returns the socket address of this endpoint.booleanisClosed()Determines if this endpoint has been closed and is no longer listens for incoming connections.java.lang.StringtoString()
-
-
-
Method Detail
-
getAddress
public java.net.SocketAddress getAddress()
Description copied from interface:ListenerEndpointReturns the socket address of this endpoint.- Specified by:
getAddressin interfaceListenerEndpoint- Returns:
- socket address.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
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() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
close
public void close(CloseMode closeMode)
Description copied from interface:ModalCloseableCloses 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:
closein interfaceModalCloseable- Parameters:
closeMode- How to close the receiver.
-
-