Class MockHttpTransport
java.lang.Object
org.opensearch.common.lifecycle.AbstractLifecycleComponent
org.opensearch.test.MockHttpTransport
- All Implemented Interfaces:
Closeable,AutoCloseable,org.opensearch.common.lease.Releasable,org.opensearch.common.lifecycle.LifecycleComponent,org.opensearch.core.service.ReportingService<org.opensearch.http.HttpInfo>,org.opensearch.http.HttpServerTransport
public class MockHttpTransport
extends org.opensearch.common.lifecycle.AbstractLifecycleComponent
implements org.opensearch.http.HttpServerTransport
A dummy http transport used by tests when not wanting to actually bind to a real address.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMarker plugin used byMockNodeto enableMockHttpTransport.Nested classes/interfaces inherited from interface org.opensearch.http.HttpServerTransport
org.opensearch.http.HttpServerTransport.DispatcherNested classes/interfaces inherited from interface org.opensearch.core.service.ReportingService
org.opensearch.core.service.ReportingService.Info -
Field Summary
Fields inherited from class org.opensearch.common.lifecycle.AbstractLifecycleComponent
lifecycleFields inherited from interface org.opensearch.http.HttpServerTransport
HTTP_SERVER_WORKER_THREAD_NAME_PREFIX -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.opensearch.common.lifecycle.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.common.lifecycle.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stopMethods inherited from interface org.opensearch.common.lease.Releasable
close
-
Constructor Details
-
MockHttpTransport
public MockHttpTransport()
-
-
Method Details
-
doStart
protected void doStart()- Specified by:
doStartin classorg.opensearch.common.lifecycle.AbstractLifecycleComponent
-
doStop
protected void doStop()- Specified by:
doStopin classorg.opensearch.common.lifecycle.AbstractLifecycleComponent
-
doClose
protected void doClose()- Specified by:
doClosein classorg.opensearch.common.lifecycle.AbstractLifecycleComponent
-
boundAddress
public org.opensearch.core.common.transport.BoundTransportAddress boundAddress()- Specified by:
boundAddressin interfaceorg.opensearch.http.HttpServerTransport
-
info
public org.opensearch.http.HttpInfo info()- Specified by:
infoin interfaceorg.opensearch.http.HttpServerTransport- Specified by:
infoin interfaceorg.opensearch.core.service.ReportingService<org.opensearch.http.HttpInfo>
-
stats
public org.opensearch.http.HttpStats stats()- Specified by:
statsin interfaceorg.opensearch.http.HttpServerTransport
-