public final class TcpTransport.NodeChannels extends java.lang.Object implements Transport.Connection
| Constructor and Description |
|---|
NodeChannels(DiscoveryNode node,
Channel[] channels,
ConnectionProfile connectionProfile) |
| Modifier and Type | Method and Description |
|---|---|
Channel |
channel(TransportRequestOptions.Type type) |
void |
close() |
java.util.List<Channel> |
getChannels() |
DiscoveryNode |
getNode()
The node this connection is associated with
|
Version |
getVersion()
Returns the version of the node this connection was established with.
|
boolean |
hasChannel(Channel channel) |
void |
sendRequest(long requestId,
java.lang.String action,
TransportRequest request,
TransportRequestOptions options)
Sends the request to the node this connection is associated with
|
public NodeChannels(DiscoveryNode node, Channel[] channels, ConnectionProfile connectionProfile)
public Version getVersion()
Transport.ConnectiongetVersion in interface Transport.Connectionpublic boolean hasChannel(Channel channel)
public java.util.List<Channel> getChannels()
public Channel channel(TransportRequestOptions.Type type)
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic DiscoveryNode getNode()
Transport.ConnectiongetNode in interface Transport.Connectionpublic void sendRequest(long requestId,
java.lang.String action,
TransportRequest request,
TransportRequestOptions options)
throws java.io.IOException,
TransportException
Transport.ConnectionsendRequest in interface Transport.ConnectionNodeNotConnectedException - if the given node is not connectedjava.io.IOExceptionTransportException