Skip navigation links
com.tangosol.coherence.rest.server
Class DefaultHttpServer
java.lang.Object
com.tangosol.coherence.rest.server.AbstractHttpServer
com.tangosol.coherence.rest.server.DefaultHttpServer
- All Implemented Interfaces:
- HttpServer
-
public class DefaultHttpServer
- extends AbstractHttpServer
Implementation of HttpServer
that uses Sun's lightweight HTTP server to handle requests.
This implementation is not recommended for production environments.
- Author:
- as 2011.06.08
Field Summary |
protected com.sun.net.httpserver.HttpServer |
m_server
HTTP server instance. |
Fields inherited from class com.tangosol.coherence.rest.server.AbstractHttpServer |
ATTR_SUBJECT, AUTH_BASIC, AUTH_CERT, AUTH_CERT_BASIC, AUTH_NONE, DEFAULT_ADDRESS, DEFAULT_IDENTITY_ASSERTER, DEFAULT_PORT, HEADER_AUTHORIZATION, HEADER_WWW_AUTHENTICATE, HTTP_BASIC_REALM, m_cacheFactory, m_fStarted, m_identityAsserter, m_mapResourceConfig, m_nPort, m_sAddr, m_sAuthMethod, m_serviceParent, m_socketProvider |
Method Summary |
protected com.sun.net.httpserver.HttpServer |
createHttpServer()
Creates a new HttpServer which will manage all root resource and provider classes declared by the resource configuration. |
protected java.lang.Object |
instantiateContainer(com.sun.jersey.spi.container.WebApplication application, com.sun.jersey.api.core.ResourceConfig config)
Factory method for Jersey container instances. |
protected void |
startInternal()
Start the server. |
protected void |
stopInternal()
Stop the server. |
Methods inherited from class com.tangosol.coherence.rest.server.AbstractHttpServer |
authenticate, createContainer, getIdentityAsserter, getLocalAddress, getLocalPort, getParentService, getResourceConfig, getSocketProvider, getSSLContext, getSSLParameters, getSubjectFromSession, handleRequest, isAuthMethodBasic, isAuthMethodCert, isAuthMethodNone, isSecure, setAuthMethod, setCacheFactory, setIdentityAsserter, setLocalAddress, setLocalPort, setParentService, setResourceConfig, setResourceConfig, setSocketProvider, start, stop, toString |
m_server
protected com.sun.net.httpserver.HttpServer m_server
- HTTP server instance.
DefaultHttpServer
public DefaultHttpServer()
startInternal
protected void startInternal()
throws java.io.IOException
- Start the server.
-
- Specified by:
startInternal
in class AbstractHttpServer
-
- Throws:
java.io.IOException
- if an error occurs
stopInternal
protected void stopInternal()
throws java.io.IOException
- Stop the server.
-
- Specified by:
stopInternal
in class AbstractHttpServer
-
- Throws:
java.io.IOException
- if an error occurs
createHttpServer
protected com.sun.net.httpserver.HttpServer createHttpServer()
throws java.io.IOException
- Creates a new HttpServer which will manage all root resource and provider classes declared by the resource configuration.
-
- Returns:
- the new HttpServer instance
- Throws:
java.io.IOException
- if an error occurs while creating the container
instantiateContainer
protected java.lang.Object instantiateContainer(com.sun.jersey.spi.container.WebApplication application,
com.sun.jersey.api.core.ResourceConfig config)
- Factory method for Jersey container instances.
-
- Specified by:
instantiateContainer
in class AbstractHttpServer
-
- Parameters:
application
- the web application the container delegates to for the handling of HTTP requests
config
- the resource configuration
- Returns:
- container instance
Skip navigation links
Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.