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,LifecycleComponent,Releasable,HttpServerTransport
public class MockHttpTransport extends AbstractLifecycleComponent implements 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 classMockHttpTransport.TestPluginMarker plugin used byMockNodeto enableMockHttpTransport.-
Nested classes/interfaces inherited from interface org.elasticsearch.http.HttpServerTransport
HttpServerTransport.Dispatcher
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
-
Fields inherited from interface org.elasticsearch.http.HttpServerTransport
HTTP_SERVER_WORKER_THREAD_NAME_PREFIX
-
-
Constructor Summary
Constructors Constructor Description MockHttpTransport()
-
Method Summary
Modifier and Type Method Description BoundTransportAddressboundAddress()protected voiddoClose()protected voiddoStart()protected voiddoStop()HttpInfoinfo()HttpStatsstats()-
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
-
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
-
Methods inherited from interface org.elasticsearch.common.lease.Releasable
close
-
-
-
-
Method Detail
-
doStart
protected void doStart()
- Specified by:
doStartin classAbstractLifecycleComponent
-
doStop
protected void doStop()
- Specified by:
doStopin classAbstractLifecycleComponent
-
doClose
protected void doClose()
- Specified by:
doClosein classAbstractLifecycleComponent
-
boundAddress
public BoundTransportAddress boundAddress()
- Specified by:
boundAddressin interfaceHttpServerTransport
-
info
public HttpInfo info()
- Specified by:
infoin interfaceHttpServerTransport
-
stats
public HttpStats stats()
- Specified by:
statsin interfaceHttpServerTransport
-
-