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.SocketAddress
address
(package private) java.lang.Object
attachment
private java.util.concurrent.atomic.AtomicBoolean
closed
private java.nio.channels.SelectionKey
key
-
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 void
close()
void
close(CloseMode closeMode)
Closes this process or endpoint and releases any system resources associated with it.java.net.SocketAddress
getAddress()
Returns the socket address of this endpoint.boolean
isClosed()
Determines if this endpoint has been closed and is no longer listens for incoming connections.java.lang.String
toString()
-
-
-
Method Detail
-
getAddress
public java.net.SocketAddress getAddress()
Description copied from interface:ListenerEndpoint
Returns the socket address of this endpoint.- Specified by:
getAddress
in interfaceListenerEndpoint
- Returns:
- socket address.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
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
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
close
public void close(CloseMode closeMode)
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.
-
-