Class ReactorNetty4HttpServerTransport

java.lang.Object
org.opensearch.common.lifecycle.AbstractLifecycleComponent
org.opensearch.http.AbstractHttpServerTransport
org.opensearch.http.reactor.netty4.ReactorNetty4HttpServerTransport
All Implemented Interfaces:
Closeable, AutoCloseable, org.opensearch.common.lease.Releasable, org.opensearch.common.lifecycle.LifecycleComponent, org.opensearch.core.service.ReportingService<HttpInfo>, HttpServerTransport

public class ReactorNetty4HttpServerTransport extends AbstractHttpServerTransport
The HTTP transport implementations based on Reactor Netty (see please HttpServer).
  • Field Details

    • SETTING_HTTP_WORKER_COUNT

      public static final Setting<Integer> SETTING_HTTP_WORKER_COUNT
      The number of Reactor Netty HTTP workers
    • SETTING_HTTP_NETTY_MAX_COMPOSITE_BUFFER_COMPONENTS

      public static Setting<Integer> SETTING_HTTP_NETTY_MAX_COMPOSITE_BUFFER_COMPONENTS
      The maximum number of composite components for request accumulation
  • Constructor Details

    • ReactorNetty4HttpServerTransport

      public ReactorNetty4HttpServerTransport(Settings settings, NetworkService networkService, BigArrays bigArrays, ThreadPool threadPool, org.opensearch.core.xcontent.NamedXContentRegistry xContentRegistry, HttpServerTransport.Dispatcher dispatcher, ClusterSettings clusterSettings, SharedGroupFactory sharedGroupFactory, Tracer tracer)
      Creates new HTTP transport implementations based on Reactor Netty (see please HttpServer).
      Parameters:
      settings - settings
      networkService - network service
      bigArrays - big array allocator
      threadPool - thread pool instance
      xContentRegistry - XContent registry instance
      dispatcher - dispatcher instance
      clusterSettings - cluster settings
      sharedGroupFactory - shared group factory
      tracer - tracer instance
  • Method Details

    • bind

      protected HttpServerChannel bind(InetSocketAddress socketAddress) throws Exception
      Binds the transport engine to the socket address
      Specified by:
      bind in class AbstractHttpServerTransport
      Parameters:
      socketAddress - socket address to bind to
      Throws:
      Exception
    • incomingRequest

      protected org.reactivestreams.Publisher<Void> incomingRequest(reactor.netty.http.server.HttpServerRequest request, reactor.netty.http.server.HttpServerResponse response)
      Handles incoming Reactor Netty request
      Parameters:
      request - request instance
      response - response instances
      Returns:
      response publisher
    • stopInternal

      protected void stopInternal()
      Called to tear down internal resources
      Specified by:
      stopInternal in class AbstractHttpServerTransport
    • doStart

      protected void doStart()
      Starts the transport
      Specified by:
      doStart in class org.opensearch.common.lifecycle.AbstractLifecycleComponent
    • onException

      public void onException(HttpChannel channel, Exception cause)
      Overrides:
      onException in class AbstractHttpServerTransport