public interface Transport extends LifecycleComponent<Transport>
Modifier and Type | Interface and Description |
---|---|
static class |
Transport.TransportSettings |
Modifier and Type | Method and Description |
---|---|
TransportAddress[] |
addressesFromString(String address,
int perAddressLimit)
Returns an address from its string representation.
|
boolean |
addressSupported(Class<? extends TransportAddress> address)
Is the address type supported.
|
BoundTransportAddress |
boundAddress()
The address the transport is bound on.
|
void |
connectToNode(DiscoveryNode node)
Connects to the given node, if already connected, does nothing.
|
void |
connectToNodeLight(DiscoveryNode node)
Connects to a node in a light manner.
|
void |
disconnectFromNode(DiscoveryNode node)
Disconnected from the given node, if not connected, will do nothing.
|
List<String> |
getLocalAddresses() |
boolean |
nodeConnected(DiscoveryNode node)
Returns true if the node is connected.
|
Map<String,BoundTransportAddress> |
profileBoundAddresses()
Further profile bound addresses
|
void |
sendRequest(DiscoveryNode node,
long requestId,
String action,
TransportRequest request,
TransportRequestOptions options)
Sends the request to the node.
|
long |
serverOpen()
Returns count of currently open connections
|
void |
transportServiceAdapter(TransportServiceAdapter service) |
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
close
void transportServiceAdapter(TransportServiceAdapter service)
BoundTransportAddress boundAddress()
Map<String,BoundTransportAddress> profileBoundAddresses()
TransportAddress[] addressesFromString(String address, int perAddressLimit) throws Exception
Exception
boolean addressSupported(Class<? extends TransportAddress> address)
boolean nodeConnected(DiscoveryNode node)
void connectToNode(DiscoveryNode node) throws ConnectTransportException
ConnectTransportException
void connectToNodeLight(DiscoveryNode node) throws ConnectTransportException
ConnectTransportException
void disconnectFromNode(DiscoveryNode node)
void sendRequest(DiscoveryNode node, long requestId, String action, TransportRequest request, TransportRequestOptions options) throws IOException, TransportException
IOException
TransportException
long serverOpen()
Copyright © 2009–2016. All rights reserved.