org.jboss.resteasy.plugins.server.sun.http

## Class SunHttpJaxrsServer

- java.lang.Object
- - org.jboss.resteasy.plugins.server.sun.http.SunHttpJaxrsServer

- All Implemented Interfaces:
    EmbeddedJaxrsServer

      public class SunHttpJaxrsServer
      extends Object
      implements EmbeddedJaxrsServer

  com.sun.net.httpserver.HttpServer adapter for Resteasy. You may instead want to create and manage your own HttpServer. Use the HttpContextBuilder class in this case to build and register a specific HttpContext.
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected HttpContextBuilder` | `context`
    `protected com.sun.net.httpserver.HttpServer` | `httpServer`
    `protected int` | `port`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SunHttpJaxrsServer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ResteasyDeployment` | `getDeployment()`
    `void` | `setDeployment(ResteasyDeployment deployment)`
    `void` | `setHttpServer(com.sun.net.httpserver.HttpServer httpServer)` If you do not provide an HttpServer instance, one will be created on startup
    `void` | `setPort(int port)` Value is ignored if HttpServer property is set.
    `void` | `setRootResourcePath(String rootResourcePath)`
    `void` | `setSecurityDomain(SecurityDomain securityDomain)` Setting a security domain will turn on Basic Authentication
    `void` | `start()`
    `void` | `stop()`

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

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

- - ### Field Detail

    - #### context

          protected HttpContextBuilder context

    - #### httpServer

          protected com.sun.net.httpserver.HttpServer httpServer

    - #### port

          protected int port

  - ### Constructor Detail

    - #### SunHttpJaxrsServer

          public SunHttpJaxrsServer()

  - ### Method Detail

    - #### setRootResourcePath

          public void setRootResourcePath(String rootResourcePath)

      Specified by:
        `setRootResourcePath` in interface `EmbeddedJaxrsServer`

    - #### getDeployment

          public ResteasyDeployment getDeployment()

      Specified by:
        `getDeployment` in interface `EmbeddedJaxrsServer`

    - #### setDeployment

          public void setDeployment(ResteasyDeployment deployment)

      Specified by:
        `setDeployment` in interface `EmbeddedJaxrsServer`

    - #### setSecurityDomain

          public void setSecurityDomain(SecurityDomain securityDomain)

      Setting a security domain will turn on Basic Authentication
      Specified by:
        `setSecurityDomain` in interface `EmbeddedJaxrsServer`
      Parameters:
        `securityDomain` -

    - #### setHttpServer

          public void setHttpServer(com.sun.net.httpserver.HttpServer httpServer)

      If you do not provide an HttpServer instance, one will be created on startup
      Parameters:
        `httpServer` -

    - #### setPort

          public void setPort(int port)

      Value is ignored if HttpServer property is set. Default value is 8080
      Parameters:
        `port` -

    - #### start

          public void start()

      Specified by:
        `start` in interface `EmbeddedJaxrsServer`

    - #### stop

          public void stop()

      Specified by:
        `stop` in interface `EmbeddedJaxrsServer`

Copyright © 2014. All Rights Reserved.