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 by MockNode to enable MockHttpTransport.

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

    org.elasticsearch.http.HttpServerTransport.Dispatcher

    Nested classes/interfaces inherited from interface org.elasticsearch.node.ReportingService

    org.elasticsearch.node.ReportingService.Info
  • 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
    org.elasticsearch.common.transport.BoundTransportAddress boundAddress()  
    protected void doClose()  
    protected void doStart()  
    protected void doStop()  
    org.elasticsearch.http.HttpInfo info()  
    org.elasticsearch.http.HttpStats stats()  

    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
  • Constructor Details

  • Method Details

    • doStart

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

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

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

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

      public org.elasticsearch.http.HttpInfo info()
      Specified by:
      info in interface org.elasticsearch.http.HttpServerTransport
      Specified by:
      info in interface org.elasticsearch.node.ReportingService<org.elasticsearch.http.HttpInfo>
    • stats

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