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 Classes
    Modifier and Type
    Class
    Description
    static class 
    Marker plugin used by MockNode to enable MockHttpTransport.

    Nested classes/interfaces inherited from interface org.opensearch.http.HttpServerTransport

    org.opensearch.http.HttpServerTransport.Dispatcher

    Nested 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

    lifecycle

    Fields inherited from interface org.opensearch.http.HttpServerTransport

    HTTP_SERVER_WORKER_THREAD_NAME_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.opensearch.core.common.transport.BoundTransportAddress
     
    protected void
     
    protected void
     
    protected void
     
    org.opensearch.http.HttpInfo
     
    org.opensearch.http.HttpStats
     

    Methods inherited from class org.opensearch.common.lifecycle.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.opensearch.common.lifecycle.LifecycleComponent

    addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop

    Methods inherited from interface org.opensearch.common.lease.Releasable

    close
  • Constructor Details

    • MockHttpTransport

      public MockHttpTransport()
  • Method Details

    • doStart

      protected void doStart()
      Specified by:
      doStart in class org.opensearch.common.lifecycle.AbstractLifecycleComponent
    • doStop

      protected void doStop()
      Specified by:
      doStop in class org.opensearch.common.lifecycle.AbstractLifecycleComponent
    • doClose

      protected void doClose()
      Specified by:
      doClose in class org.opensearch.common.lifecycle.AbstractLifecycleComponent
    • boundAddress

      public org.opensearch.core.common.transport.BoundTransportAddress boundAddress()
      Specified by:
      boundAddress in interface org.opensearch.http.HttpServerTransport
    • info

      public org.opensearch.http.HttpInfo info()
      Specified by:
      info in interface org.opensearch.http.HttpServerTransport
      Specified by:
      info in interface org.opensearch.core.service.ReportingService<org.opensearch.http.HttpInfo>
    • stats

      public org.opensearch.http.HttpStats stats()
      Specified by:
      stats in interface org.opensearch.http.HttpServerTransport