Package org.elasticsearch.test.transport
Class StubbableTransport
java.lang.Object
org.elasticsearch.test.transport.StubbableTransport
- All Implemented Interfaces:
Closeable,AutoCloseable,LifecycleComponent,org.elasticsearch.core.Releasable,Transport
- Direct Known Subclasses:
MockTransport
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfaceclassNested classes/interfaces inherited from interface org.elasticsearch.transport.Transport
Transport.Connection, Transport.RequestHandlers, Transport.ResponseContext<T extends TransportResponse>, Transport.ResponseHandlers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLifecycleListener(LifecycleListener listener) addressesFromString(String address) voidclose()getStats()voidopenConnection(DiscoveryNode node, ConnectionProfile profile, ActionListener<Transport.Connection> listener) booleansetDefaultConnectBehavior(StubbableTransport.OpenConnectionBehavior openConnectionBehavior) voidsetMessageListener(TransportMessageListener listener) voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.transport.Transport
isSecure, registerRequestHandler, setSlowLogThreshold
-
Constructor Details
-
StubbableTransport
-
-
Method Details
-
setDefaultConnectBehavior
public boolean setDefaultConnectBehavior(StubbableTransport.OpenConnectionBehavior openConnectionBehavior) -
setMessageListener
- Specified by:
setMessageListenerin interfaceTransport
-
boundAddress
- Specified by:
boundAddressin interfaceTransport
-
boundRemoteIngressAddress
- Specified by:
boundRemoteIngressAddressin interfaceTransport
-
addressesFromString
- Specified by:
addressesFromStringin interfaceTransport- Throws:
UnknownHostException
-
getDefaultSeedAddresses
- Specified by:
getDefaultSeedAddressesin interfaceTransport
-
openConnection
public void openConnection(DiscoveryNode node, ConnectionProfile profile, ActionListener<Transport.Connection> listener) - Specified by:
openConnectionin interfaceTransport
-
getStats
-
getResponseHandlers
- Specified by:
getResponseHandlersin interfaceTransport
-
getRequestHandlers
- Specified by:
getRequestHandlersin interfaceTransport
-
lifecycleState
- Specified by:
lifecycleStatein interfaceLifecycleComponent
-
addLifecycleListener
- Specified by:
addLifecycleListenerin interfaceLifecycleComponent
-
start
public void start()- Specified by:
startin interfaceLifecycleComponent
-
stop
public void stop()- Specified by:
stopin interfaceLifecycleComponent
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
profileBoundAddresses
- Specified by:
profileBoundAddressesin interfaceTransport
-
newNetworkBytesStream
- Specified by:
newNetworkBytesStreamin interfaceTransport
-