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, stopclosevoid transportServiceAdapter(TransportServiceAdapter service)
BoundTransportAddress boundAddress()
Map<String,BoundTransportAddress> profileBoundAddresses()
TransportAddress[] addressesFromString(String address, int perAddressLimit) throws Exception
Exceptionboolean addressSupported(Class<? extends TransportAddress> address)
boolean nodeConnected(DiscoveryNode node)
void connectToNode(DiscoveryNode node) throws ConnectTransportException
ConnectTransportExceptionvoid connectToNodeLight(DiscoveryNode node) throws ConnectTransportException
ConnectTransportExceptionvoid disconnectFromNode(DiscoveryNode node)
void sendRequest(DiscoveryNode node, long requestId, String action, TransportRequest request, TransportRequestOptions options) throws IOException, TransportException
IOExceptionTransportExceptionlong serverOpen()
Copyright © 2009–2017. All rights reserved.