org.glassfish.jersey.jdkhttp
Class JdkHttpServerFactory

java.lang.Object
  extended by org.glassfish.jersey.jdkhttp.JdkHttpServerFactory

public class JdkHttpServerFactory
extends Object

Factory for creating JDK HttpServer instances adapted to the ApplicationHandler.

Author:
Miroslav Fuksa (miroslav.fuksa at oracle.com)

Method Summary
static com.sun.net.httpserver.HttpServer createHttpServer(URI uri, ApplicationHandler appHandler)
          Creates and starts the JDK HttpServer with the Jersey application deployed on the given URI.
static com.sun.net.httpserver.HttpServer createHttpServer(URI uri, ResourceConfig configuration)
          Creates and starts the JDK HttpServer with the Jersey application deployed on the given URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createHttpServer

public static com.sun.net.httpserver.HttpServer createHttpServer(URI uri,
                                                                 ResourceConfig configuration)
                                                          throws javax.ws.rs.ProcessingException
Creates and starts the JDK HttpServer with the Jersey application deployed on the given URI.

The returned JDK HttpServer is started.

Parameters:
uri - The uri on which the Jersey application will be deployed.
configuration - The Jersey server-side application configuration.
Returns:
Newly created HttpServer.
Throws:
javax.ws.rs.ProcessingException - Thrown when problems during server creation occurs.

createHttpServer

public static com.sun.net.httpserver.HttpServer createHttpServer(URI uri,
                                                                 ApplicationHandler appHandler)
                                                          throws javax.ws.rs.ProcessingException
Creates and starts the JDK HttpServer with the Jersey application deployed on the given URI.

The returned JDK HttpServer is started.

Parameters:
uri - The uri on which the Jersey application will be deployed.
appHandler - The Jersey server-side application handler.
Returns:
Newly created HttpServer.
Throws:
javax.ws.rs.ProcessingException - Thrown when problems during server creation occurs.


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.