Package org.elasticsearch.test
Class MockHttpTransport
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.test.MockHttpTransport
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.elasticsearch.common.component.LifecycleComponent
,org.elasticsearch.common.lease.Releasable
,org.elasticsearch.http.HttpServerTransport
,org.elasticsearch.node.ReportingService<org.elasticsearch.http.HttpInfo>
public class MockHttpTransport
extends org.elasticsearch.common.component.AbstractLifecycleComponent
implements org.elasticsearch.http.HttpServerTransport
A dummy http transport used by tests when not wanting to actually bind to a real address.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MockHttpTransport.TestPlugin
Marker plugin used byMockNode
to enableMockHttpTransport
. -
Field Summary
-
Constructor Summary
Constructors Constructor Description MockHttpTransport()
-
Method Summary
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MockHttpTransport
public MockHttpTransport()
-
-
Method Details
-
doStart
protected void doStart()- Specified by:
doStart
in classorg.elasticsearch.common.component.AbstractLifecycleComponent
-
doStop
protected void doStop()- Specified by:
doStop
in classorg.elasticsearch.common.component.AbstractLifecycleComponent
-
doClose
protected void doClose()- Specified by:
doClose
in classorg.elasticsearch.common.component.AbstractLifecycleComponent
-
boundAddress
public org.elasticsearch.common.transport.BoundTransportAddress boundAddress()- Specified by:
boundAddress
in interfaceorg.elasticsearch.http.HttpServerTransport
-
info
public org.elasticsearch.http.HttpInfo info()- Specified by:
info
in interfaceorg.elasticsearch.http.HttpServerTransport
- Specified by:
info
in interfaceorg.elasticsearch.node.ReportingService<org.elasticsearch.http.HttpInfo>
-
stats
public org.elasticsearch.http.HttpStats stats()- Specified by:
stats
in interfaceorg.elasticsearch.http.HttpServerTransport
-