Class ReactorNettyJaxrsServer

java.lang.Object
org.jboss.resteasy.plugins.server.reactor.netty.ReactorNettyJaxrsServer
All Implemented Interfaces:
EmbeddedJaxrsServer<ReactorNettyJaxrsServer>, EmbeddedServer

@Deprecated(forRemoval=true, since="6.2.13.Final") public class ReactorNettyJaxrsServer extends Object implements EmbeddedJaxrsServer<ReactorNettyJaxrsServer>
Deprecated, for removal: This API element is subject to removal in a future version.
use the new dependencies
A server adapter built on top of reactor-netty. Similar to the adapter built on top of netty4, this adapter will ultimately run on Netty rails. Leveraging reactor-netty brings 3 main benefits, which are: 1. Reactor-netty's HttpServer + handle(req, resp) API is a little closer match to how a normal HTTP server works. Basically, it should be easier for an HTTP web server person to maintain compared to a raw Netty implementation. However, this assumes you don't have to delve into reactor-netty! 2. Reactor Netty puts a reactor facade on top of Netty. The Observable+Iterable programming paradigm is more general purpose than Netty's IO-centric Channel concept. In theory, it should be more beneficial to learn:) 3. When paired with a Netty-based client (e.g. the JAX-RS client powered by reactor-netty), the threadpool can be efficiently shared between the client and the server.
  • Field Details

    • hostname

      protected String hostname
      Deprecated, for removal: This API element is subject to removal in a future version.
    • configuredPort

      protected int configuredPort
      Deprecated, for removal: This API element is subject to removal in a future version.
    • runtimePort

      protected int runtimePort
      Deprecated, for removal: This API element is subject to removal in a future version.
    • root

      protected String root
      Deprecated, for removal: This API element is subject to removal in a future version.
    • deployment

      protected ResteasyDeployment deployment
      Deprecated, for removal: This API element is subject to removal in a future version.
    • domain

      protected SecurityDomain domain
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • ReactorNettyJaxrsServer

      public ReactorNettyJaxrsServer()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • deploy

      public ReactorNettyJaxrsServer deploy()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      deploy in interface EmbeddedJaxrsServer<ReactorNettyJaxrsServer>
    • start

      public ReactorNettyJaxrsServer start()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      start in interface EmbeddedJaxrsServer<ReactorNettyJaxrsServer>
    • startAndBlock

      public void startAndBlock()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Calling this method will block the current thread.
    • stop

      public void stop()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: EmbeddedServer
      Stops the server.
      Specified by:
      stop in interface EmbeddedServer
    • getDeployment

      public ResteasyDeployment getDeployment()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: EmbeddedServer
      Returns the deployment being used for the server.
      Specified by:
      getDeployment in interface EmbeddedServer
      Returns:
      the deployment
    • setDeployment

      public ReactorNettyJaxrsServer setDeployment(ResteasyDeployment deployment)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setDeployment in interface EmbeddedJaxrsServer<ReactorNettyJaxrsServer>
    • setPort

      public ReactorNettyJaxrsServer setPort(int port)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setPort in interface EmbeddedJaxrsServer<ReactorNettyJaxrsServer>
    • getPort

      public int getPort()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setHostname

      public ReactorNettyJaxrsServer setHostname(String hostname)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setHostname in interface EmbeddedJaxrsServer<ReactorNettyJaxrsServer>
    • getHostname

      public String getHostname()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setRootResourcePath

      public ReactorNettyJaxrsServer setRootResourcePath(String rootResourcePath)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setRootResourcePath in interface EmbeddedJaxrsServer<ReactorNettyJaxrsServer>
    • setSecurityDomain

      public ReactorNettyJaxrsServer setSecurityDomain(SecurityDomain sc)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setSecurityDomain in interface EmbeddedJaxrsServer<ReactorNettyJaxrsServer>
    • setIdleTimeout

      public ReactorNettyJaxrsServer setIdleTimeout(Duration idleTimeout)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setSSLContext

      public ReactorNettyJaxrsServer setSSLContext(SSLContext sslContext)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setClientAuth

      public ReactorNettyJaxrsServer setClientAuth(io.netty.handler.ssl.ClientAuth clientAuth)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setCleanUpTasks

      public ReactorNettyJaxrsServer setCleanUpTasks(List<Runnable> cleanUpTasks)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets clean up tasks that are needed immediately after Dispatcher.invoke(HttpRequest, HttpResponse) yet before any asynchronous asynchronous work is continued by the reactor-netty server. Since these run on the Netty event loop threads, it is important that they run fast (not block). It is expected that you take special care with exceptions. This is useful in certain cases where servlet Filters have options that are hard to achieve with the pure JAX-RS API, such as: doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) { establishThreadLocals(); chain.doFilter(req, resp, chain); clearThreadLocals(); }
      Parameters:
      cleanUpTasks - List of clean up tasks
      Returns:
      ReactorNettyJaxrsServer
    • setDecoderSpecFn

      public void setDecoderSpecFn(UnaryOperator<reactor.netty.http.server.HttpRequestDecoderSpec> decoderSpecFn)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      decoderSpecFn -