- All Superinterfaces:
public interface TcpChannel extends CloseableChannel
This is a tcp channel representing a single channel connection to another node. It is the base channel abstraction used by the
TransportService. All tcp transport implementations must return channels that adhere to the required method contracts.
Nested Class SummaryModifier and TypeInterfaceDescription
Method SummaryModifier and TypeMethodDescription
(ActionListener<Void> listener)Adds a listener that will be executed when the channel is connected.Returns stats about this channelReturns the local address for this channel.This returns the profile for this channel.Returns the remote address for this channel.
booleanIndicates if the channel is an inbound server channel.
(BytesReference reference, ActionListener<Void> listener)Sends a tcp message to the channel.
Methods inherited from interface org.elasticsearch.common.network.CloseableChannel
addCloseListener, close, isOpen
isServerChannelboolean isServerChannel()Indicates if the channel is an inbound server channel.
getProfileString getProfile()This returns the profile for this channel.
getLocalAddressInetSocketAddress getLocalAddress()Returns the local address for this channel.
- the local address of this channel.
getRemoteAddressInetSocketAddress getRemoteAddress()Returns the remote address for this channel. Can be null if channel does not have a remote address.
- the remote address of this channel.
(BytesReference reference, ActionListener<Void> listener)Sends a tcp message to the channel. The listener will be executed once the send process has been completed.
reference- to send to channel
listener- to execute upon send completion
(ActionListener<Void> listener)Adds a listener that will be executed when the channel is connected. If the channel is still unconnected when this listener is added, the listener will be executed by the thread that eventually finishes the channel connection. If the channel is already connected when the listener is added the listener will immediately be executed by the thread that is attempting to add the listener.
listener- to be executed
getChannelStatsTcpChannel.ChannelStats getChannelStats()Returns stats about this channel