Package org.apache.http.impl.nio.reactor
Class ChannelEntry
- java.lang.Object
-
- org.apache.http.impl.nio.reactor.ChannelEntry
-
public class ChannelEntry extends java.lang.Object
SocketChannel
entry maintained by the I/O reactor. If the channel represents an outgoing client connection, this entry also contains the originalSessionRequestImpl
used to request it.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description ChannelEntry(java.nio.channels.SocketChannel channel)
Creates new ChannelEntry.ChannelEntry(java.nio.channels.SocketChannel channel, SessionRequestImpl sessionRequest)
Creates new ChannelEntry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getAttachment()
Returns the original session request attachment, if available.java.nio.channels.SocketChannel
getChannel()
Returns the channel.SessionRequestImpl
getSessionRequest()
Returns the original session request, if available.
-
-
-
Constructor Detail
-
ChannelEntry
public ChannelEntry(java.nio.channels.SocketChannel channel, SessionRequestImpl sessionRequest)
Creates new ChannelEntry.- Parameters:
channel
- the channelsessionRequest
- original session request. Can benull
if the channel represents an incoming server-side connection.
-
ChannelEntry
public ChannelEntry(java.nio.channels.SocketChannel channel)
Creates new ChannelEntry.- Parameters:
channel
- the channel.
-
-
Method Detail
-
getSessionRequest
public SessionRequestImpl getSessionRequest()
Returns the original session request, if available. If the channel entry represents an incoming server-side connection, returnsnull
.- Returns:
- the original session request, if client-side channel,
null
otherwise.
-
getAttachment
public java.lang.Object getAttachment()
Returns the original session request attachment, if available.- Returns:
- the original session request attachment, if available,
null
otherwise.
-
getChannel
public java.nio.channels.SocketChannel getChannel()
Returns the channel.- Returns:
- the channel.
-
-