Class SunHttpJaxrsServer
- java.lang.Object
-
- org.jboss.resteasy.plugins.server.sun.http.SunHttpJaxrsServer
-
- All Implemented Interfaces:
EmbeddedJaxrsServer<SunHttpJaxrsServer>
public class SunHttpJaxrsServer extends Object implements EmbeddedJaxrsServer<SunHttpJaxrsServer>
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 Description protected int
configuredPort
protected HttpContextBuilder
context
protected ResteasyDeployment
deployment
protected com.sun.net.httpserver.HttpServer
httpServer
protected int
runtimePort
-
Constructor Summary
Constructors Constructor Description SunHttpJaxrsServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SunHttpJaxrsServer
deploy()
ResteasyDeployment
getDeployment()
int
getPort()
Gets port number of this HttpServer.SunHttpJaxrsServer
setDeployment(ResteasyDeployment deployment)
SunHttpJaxrsServer
setHostname(String hostname)
SunHttpJaxrsServer
setHttpServer(com.sun.net.httpserver.HttpServer httpServer)
If you do not provide an HttpServer instance, one will be created on startupSunHttpJaxrsServer
setPort(int port)
Value is ignored if HttpServer property is set.SunHttpJaxrsServer
setRootResourcePath(String rootResourcePath)
SunHttpJaxrsServer
setSecurityDomain(SecurityDomain securityDomain)
Setting a security domain will turn on Basic AuthenticationSunHttpJaxrsServer
start()
void
stop()
-
-
-
Field Detail
-
context
protected HttpContextBuilder context
-
httpServer
protected com.sun.net.httpserver.HttpServer httpServer
-
configuredPort
protected int configuredPort
-
runtimePort
protected int runtimePort
-
deployment
protected ResteasyDeployment deployment
-
-
Method Detail
-
deploy
public SunHttpJaxrsServer deploy()
- Specified by:
deploy
in interfaceEmbeddedJaxrsServer<SunHttpJaxrsServer>
-
start
public SunHttpJaxrsServer start()
- Specified by:
start
in interfaceEmbeddedJaxrsServer<SunHttpJaxrsServer>
-
stop
public void stop()
- Specified by:
stop
in interfaceEmbeddedJaxrsServer<SunHttpJaxrsServer>
-
getDeployment
public ResteasyDeployment getDeployment()
- Specified by:
getDeployment
in interfaceEmbeddedJaxrsServer<SunHttpJaxrsServer>
-
setDeployment
public SunHttpJaxrsServer setDeployment(ResteasyDeployment deployment)
- Specified by:
setDeployment
in interfaceEmbeddedJaxrsServer<SunHttpJaxrsServer>
-
setPort
public SunHttpJaxrsServer setPort(int port)
Value is ignored if HttpServer property is set. Default value is 8080- Specified by:
setPort
in interfaceEmbeddedJaxrsServer<SunHttpJaxrsServer>
- Parameters:
port
-
-
getPort
public int getPort()
Gets port number of this HttpServer.- Returns:
- port number.
-
setHostname
public SunHttpJaxrsServer setHostname(String hostname)
- Specified by:
setHostname
in interfaceEmbeddedJaxrsServer<SunHttpJaxrsServer>
-
setSecurityDomain
public SunHttpJaxrsServer setSecurityDomain(SecurityDomain securityDomain)
Setting a security domain will turn on Basic Authentication- Specified by:
setSecurityDomain
in interfaceEmbeddedJaxrsServer<SunHttpJaxrsServer>
- Parameters:
securityDomain
-
-
setRootResourcePath
public SunHttpJaxrsServer setRootResourcePath(String rootResourcePath)
- Specified by:
setRootResourcePath
in interfaceEmbeddedJaxrsServer<SunHttpJaxrsServer>
-
setHttpServer
public SunHttpJaxrsServer setHttpServer(com.sun.net.httpserver.HttpServer httpServer)
If you do not provide an HttpServer instance, one will be created on startup- Parameters:
httpServer
-
-
-