org.jboss.resteasy.plugins.server.undertow

## Class UndertowJaxrsServer

- java.lang.Object
- - org.jboss.resteasy.plugins.server.undertow.UndertowJaxrsServer

-     public class UndertowJaxrsServer
      extends Object

  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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected io.undertow.Undertow` | `server`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UndertowJaxrsServer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `UndertowJaxrsServer` | `deploy(Application application)` Creates a web deployment for the jaxrs Application.
    `UndertowJaxrsServer` | `deploy(Application application, String contextPath)` Creates a web deployment for the jaxrs Application.
    `UndertowJaxrsServer` | `deploy(Class<? extends Application> application)` Creates a web deployment for the jaxrs Application.
    `UndertowJaxrsServer` | `deploy(Class<? extends Application> application, String contextPath)` Creates a web deployment for the jaxrs Application.
    `UndertowJaxrsServer` | `deploy(io.undertow.servlet.api.DeploymentInfo builder)` Adds an arbitrary web deployment to underlying Undertow server.
    `UndertowJaxrsServer` | `deploy(ResteasyDeployment deployment)` Creates a web deployment under "/"
    `UndertowJaxrsServer` | `deploy(ResteasyDeployment deployment, String contextPath)` Creates a web deployment under contextPath
    `UndertowJaxrsServer` | `start()`
    `UndertowJaxrsServer` | `start(io.undertow.Undertow.Builder builder)`
    `void` | `stop()`
    `io.undertow.servlet.api.DeploymentInfo` | `undertowDeployment(Class<? extends Application> application)` Creates a web deployment for the jaxrs Application.
    `io.undertow.servlet.api.DeploymentInfo` | `undertowDeployment(Class<? extends Application> application, String mapping)` Creates a web deployment for the jaxrs Application.
    `io.undertow.servlet.api.DeploymentInfo` | `undertowDeployment(ResteasyDeployment deployment)` 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.
    `io.undertow.servlet.api.DeploymentInfo` | `undertowDeployment(ResteasyDeployment deployment, String mapping)` 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);

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### server

          protected io.undertow.Undertow server

  - ### Constructor Detail

    - #### UndertowJaxrsServer

          public UndertowJaxrsServer()

  - ### Method Detail

    - #### undertowDeployment

          public io.undertow.servlet.api.DeploymentInfo undertowDeployment(ResteasyDeployment deployment,
                                                                  String mapping)

      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:
        `deployment` -
        `mapping` - 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 deployment)

      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. Resteasy servlet is mapped to "/*"
      Parameters:
        `deployment` -
      Returns:

    - #### undertowDeployment

          public io.undertow.servlet.api.DeploymentInfo undertowDeployment(Class<? extends Application> application,
                                                                  String mapping)

      Creates a web deployment for the jaxrs Application. Will ignore any @ApplicationPath annotation.
      Parameters:
        `application` -
        `mapping` - resteasy.servlet.mapping.prefix
      Returns:

    - #### undertowDeployment

          public io.undertow.servlet.api.DeploymentInfo undertowDeployment(Class<? extends Application> application)

      Creates a web deployment for the jaxrs Application. Will bind the resteasy.servlet.mapping.prefix to @ApplicationPath if it exists, otherwise "/".
      Parameters:
        `application` -
      Returns:

    - #### deploy

          public UndertowJaxrsServer deploy(ResteasyDeployment deployment)

      Creates a web deployment under "/"
      Parameters:
        `deployment` -
      Returns:

    - #### deploy

          public UndertowJaxrsServer deploy(ResteasyDeployment deployment,
                                   String contextPath)

      Creates a web deployment under contextPath
      Parameters:
        `deployment` -
        `contextPath` -
      Returns:

    - #### deploy

          public UndertowJaxrsServer deploy(Class<? extends Application> application)

      Creates a web deployment for the jaxrs Application. Will bind the contextPath to @ApplicationPath if it exists, otherwise "/".
      Parameters:
        `application` -
      Returns:

    - #### deploy

          public UndertowJaxrsServer deploy(Class<? extends Application> application,
                                   String contextPath)

      Creates a web deployment for the jaxrs Application. Will ignore any @ApplicationPath annotation.
      Parameters:
        `application` -
        `contextPath` -
      Returns:

    - #### deploy

          public UndertowJaxrsServer deploy(Application application)

      Creates a web deployment for the jaxrs Application. Will bind the contextPath to @ApplicationPath if it exists, otherwise "/".
      Parameters:
        `application` -
      Returns:

    - #### deploy

          public UndertowJaxrsServer deploy(Application application,
                                   String contextPath)

      Creates a web deployment for the jaxrs Application. Will ignore any @ApplicationPath annotation.
      Parameters:
        `application` -
        `contextPath` -
      Returns:

    - #### 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)

    - #### start

          public UndertowJaxrsServer start()

    - #### stop

          public void stop()

Copyright © 2014. All Rights Reserved.