Package org.elasticsearch.transport
Interface Transport
- All Superinterfaces:
AutoCloseable
,Closeable
,LifecycleComponent
,org.elasticsearch.core.Releasable
- All Known Implementing Classes:
TcpTransport
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A unidirectional connection to aDiscoveryNode
static class
static class
Transport.ResponseContext<T extends TransportResponse>
This class represents a response context that encapsulates the actual response handler, the action and the connection it was executed on.static class
This class is a registry that allows -
Method Summary
Modifier and TypeMethodDescriptionaddressesFromString(String address)
Returns an address from its string representation.The address the transport is bound on.Returns a list of all local addresses for this transportgetStats()
default boolean
isSecure()
void
openConnection(DiscoveryNode node, ConnectionProfile profile, ActionListener<Transport.Connection> listener)
Opens a new connection to the given node.Further profile bound addressesdefault <Request extends TransportRequest>
voidregisterRequestHandler(RequestHandlerRegistry<Request> reg)
Registers a new request handlervoid
setMessageListener(TransportMessageListener listener)
default void
setSlowLogThreshold(org.elasticsearch.core.TimeValue slowLogThreshold)
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
Methods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
registerRequestHandler
default <Request extends TransportRequest> void registerRequestHandler(RequestHandlerRegistry<Request> reg)Registers a new request handler -
setMessageListener
-
setSlowLogThreshold
default void setSlowLogThreshold(org.elasticsearch.core.TimeValue slowLogThreshold) -
isSecure
default boolean isSecure() -
boundAddress
BoundTransportAddress boundAddress()The address the transport is bound on. -
profileBoundAddresses
Map<String,BoundTransportAddress> profileBoundAddresses()Further profile bound addresses- Returns:
null
iff profiles are unsupported, otherwise a map with name of profile and its bound transport address
-
addressesFromString
Returns an address from its string representation.- Throws:
UnknownHostException
-
getDefaultSeedAddresses
Returns a list of all local addresses for this transport -
openConnection
void openConnection(DiscoveryNode node, ConnectionProfile profile, ActionListener<Transport.Connection> listener)Opens a new connection to the given node. When the connection is fully connected, the listener is called. The ActionListener will be called on the calling thread or the generic thread pool. -
getStats
TransportStats getStats() -
getResponseHandlers
Transport.ResponseHandlers getResponseHandlers() -
getRequestHandlers
Transport.RequestHandlers getRequestHandlers()
-