Class UndertowJaxrsServer

java.lang.Object
org.jboss.resteasy.plugins.server.undertow.UndertowJaxrsServer
All Implemented Interfaces:
org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer<UndertowJaxrsServer>, org.jboss.resteasy.plugins.server.embedded.EmbeddedServer

@Priority(150) public class UndertowJaxrsServer extends Object implements org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer<UndertowJaxrsServer>
Wrapper around Undertow to make resteasy deployments easier Each ResteasyDeployment or jaxrs Application is deployed under its own web deployment (WAR) You may also deploy after the server has started.
Version:
$Revision: 1 $
Author:
Bill Burke
  • Field Details

    • root

      protected final io.undertow.server.handlers.PathHandler root
    • container

      protected final io.undertow.servlet.api.ServletContainer container
    • server

      protected io.undertow.Undertow server
    • manager

      protected io.undertow.servlet.api.DeploymentManager manager
    • contextParams

      protected Map<String,String> contextParams
    • initParams

      protected Map<String,String> initParams
  • Constructor Details

    • UndertowJaxrsServer

      public UndertowJaxrsServer()
  • Method Details

    • deploy

      public UndertowJaxrsServer deploy()
      Specified by:
      deploy in interface org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer<UndertowJaxrsServer>
    • start

      public void start(jakarta.ws.rs.SeBootstrap.Configuration configuration)
      Specified by:
      start in interface org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer<UndertowJaxrsServer>
      Specified by:
      start in interface org.jboss.resteasy.plugins.server.embedded.EmbeddedServer
    • start

      public UndertowJaxrsServer start()
      Specified by:
      start in interface org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer<UndertowJaxrsServer>
    • stop

      public void stop()
      Specified by:
      stop in interface org.jboss.resteasy.plugins.server.embedded.EmbeddedServer
    • getDeployment

      public ResteasyDeployment getDeployment()
      Specified by:
      getDeployment in interface org.jboss.resteasy.plugins.server.embedded.EmbeddedServer
    • setDeployment

      public UndertowJaxrsServer setDeployment(ResteasyDeployment deployment)
      Specified by:
      setDeployment in interface org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer<UndertowJaxrsServer>
    • setPort

      public UndertowJaxrsServer setPort(int port)
      Specified by:
      setPort in interface org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer<UndertowJaxrsServer>
    • setHostname

      public UndertowJaxrsServer setHostname(String hostname)
      Specified by:
      setHostname in interface org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer<UndertowJaxrsServer>
    • setRootResourcePath

      public UndertowJaxrsServer setRootResourcePath(String rootResourcePath)
      Specified by:
      setRootResourcePath in interface org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer<UndertowJaxrsServer>
    • setSecurityDomain

      public UndertowJaxrsServer setSecurityDomain(org.jboss.resteasy.plugins.server.embedded.SecurityDomain sc)
      Specified by:
      setSecurityDomain in interface org.jboss.resteasy.plugins.server.embedded.EmbeddedJaxrsServer<UndertowJaxrsServer>
    • deploy

      public UndertowJaxrsServer deploy(jakarta.ws.rs.core.Application application)
    • deploy

      public UndertowJaxrsServer deploy(jakarta.ws.rs.core.Application application, String contextPath)
    • deploy

      public UndertowJaxrsServer deploy(Class<? extends jakarta.ws.rs.core.Application> application)
    • deploy

      public UndertowJaxrsServer deploy(Class<? extends jakarta.ws.rs.core.Application> application, String contextPath)
    • undertowDeployment

      public io.undertow.servlet.api.DeploymentInfo undertowDeployment(ResteasyDeployment resteasyDeployment, String mappingPrefix)
      Creates a web deployment for your ResteasyDeployent so you can set up things like security constraints You'd call this method, add your servlet security constraints, then call deploy(DeploymentInfo) Note, only one ResteasyDeployment can be applied per DeploymentInfo ResteasyServlet is mapped to mapping + "/*" Example: DeploymentInfo di = server.undertowDeployment(resteasyDeployment, "rest"); di.setDeploymentName("MyDeployment") di.setContextRoot("root"); server.deploy(di);
      Parameters:
      resteasyDeployment -
      mappingPrefix - resteasy.servlet.mapping.prefix
      Returns:
      must be deployed by calling deploy(DeploymentInfo), also does not set context path or deployment name
    • undertowDeployment

      public io.undertow.servlet.api.DeploymentInfo undertowDeployment(ResteasyDeployment resteasyDeployment)
    • undertowDeployment

      public io.undertow.servlet.api.DeploymentInfo undertowDeployment(Class<? extends jakarta.ws.rs.core.Application> application)
    • addResourcePrefixPath

      public void addResourcePrefixPath(String path, io.undertow.server.handlers.resource.ResourceHandler handler)
      Maps a path prefix to a resource handler to allow serving resources other than the JAX-RS endpoints. For example, this can be used for serving static resources like web pages or API documentation that might be deployed with the REST application server.
      Parameters:
      path -
      handler -
    • deploy

      public UndertowJaxrsServer deploy(ResteasyDeployment resteasyDeployment)
    • deploy

      public UndertowJaxrsServer deploy(io.undertow.servlet.api.DeploymentInfo builder)
      Adds an arbitrary web deployment to underlying Undertow server. This is for your own deployments
      Parameters:
      builder -
      Returns:
    • start

      public UndertowJaxrsServer start(io.undertow.Undertow.Builder builder)
    • getManager

      public io.undertow.servlet.api.DeploymentManager getManager()
    • getContextParams

      public Map<String,String> getContextParams()
    • setContextParams

      public UndertowJaxrsServer setContextParams(Map<String,String> contextParams)
    • getInitParams

      public Map<String,String> getInitParams()
    • setInitParams

      public UndertowJaxrsServer setInitParams(Map<String,String> initParams)
    • deployOldStyle

      public UndertowJaxrsServer deployOldStyle(Class<? extends jakarta.ws.rs.core.Application> application)
    • deployOldStyle

      public UndertowJaxrsServer deployOldStyle(Class<? extends jakarta.ws.rs.core.Application> application, String ctxtPath)