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 Summary
FieldsModifier and TypeFieldDescriptionprotected int
Deprecated, for removal: This API element is subject to removal in a future version.protected ResteasyDeployment
Deprecated, for removal: This API element is subject to removal in a future version.protected SecurityDomain
Deprecated, for removal: This API element is subject to removal in a future version.protected String
Deprecated, for removal: This API element is subject to removal in a future version.protected String
Deprecated, for removal: This API element is subject to removal in a future version.protected int
Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptiondeploy()
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns the deployment being used for the server.Deprecated, for removal: This API element is subject to removal in a future version.int
getPort()
Deprecated, for removal: This API element is subject to removal in a future version.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 afterDispatcher.invoke(org.jboss.resteasy.spi.HttpRequest, org.jboss.resteasy.spi.HttpResponse)
yet before any asynchronous asynchronous work is continued by the reactor-netty server.setClientAuth
(io.netty.handler.ssl.ClientAuth clientAuth) Deprecated, for removal: This API element is subject to removal in a future version.void
setDecoderSpecFn
(UnaryOperator<reactor.netty.http.server.HttpRequestDecoderSpec> decoderSpecFn) Deprecated, for removal: This API element is subject to removal in a future version.setDeployment
(ResteasyDeployment deployment) Deprecated, for removal: This API element is subject to removal in a future version.setHostname
(String hostname) Deprecated, for removal: This API element is subject to removal in a future version.setIdleTimeout
(Duration idleTimeout) Deprecated, for removal: This API element is subject to removal in a future version.setPort
(int port) Deprecated, for removal: This API element is subject to removal in a future version.setRootResourcePath
(String rootResourcePath) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.setSSLContext
(SSLContext sslContext) Deprecated, for removal: This API element is subject to removal in a future version.start()
Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.Calling this method will block the current thread.void
stop()
Deprecated, for removal: This API element is subject to removal in a future version.Stops the server.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer
start
-
Field Details
-
hostname
Deprecated, for removal: This API element is subject to removal in a future version. -
configuredPort
protected int configuredPortDeprecated, for removal: This API element is subject to removal in a future version. -
runtimePort
protected int runtimePortDeprecated, for removal: This API element is subject to removal in a future version. -
root
Deprecated, for removal: This API element is subject to removal in a future version. -
deployment
Deprecated, for removal: This API element is subject to removal in a future version. -
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
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
deploy
in interfaceEmbeddedJaxrsServer<ReactorNettyJaxrsServer>
-
start
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
start
in interfaceEmbeddedJaxrsServer<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 interfaceEmbeddedServer
-
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 interfaceEmbeddedServer
- Returns:
- the deployment
-
setDeployment
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setDeployment
in interfaceEmbeddedJaxrsServer<ReactorNettyJaxrsServer>
-
setPort
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setPort
in interfaceEmbeddedJaxrsServer<ReactorNettyJaxrsServer>
-
getPort
public int getPort()Deprecated, for removal: This API element is subject to removal in a future version. -
setHostname
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setHostname
in interfaceEmbeddedJaxrsServer<ReactorNettyJaxrsServer>
-
getHostname
Deprecated, for removal: This API element is subject to removal in a future version. -
setRootResourcePath
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setRootResourcePath
in interfaceEmbeddedJaxrsServer<ReactorNettyJaxrsServer>
-
setSecurityDomain
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setSecurityDomain
in interfaceEmbeddedJaxrsServer<ReactorNettyJaxrsServer>
-
setIdleTimeout
Deprecated, for removal: This API element is subject to removal in a future version. -
setSSLContext
Deprecated, for removal: This API element is subject to removal in a future version. -
setClientAuth
Deprecated, for removal: This API element is subject to removal in a future version. -
setCleanUpTasks
Deprecated, for removal: This API element is subject to removal in a future version.Sets clean up tasks that are needed immediately afterDispatcher.invoke(org.jboss.resteasy.spi.HttpRequest, org.jboss.resteasy.spi.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
-
-