Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.coherence.rest.server
Class SimpleHttpServer

java.lang.Object
  extended by com.tangosol.coherence.rest.server.AbstractHttpServer
      extended by com.tangosol.coherence.rest.server.SimpleHttpServer

All Implemented Interfaces:
HttpServer

public class SimpleHttpServer
extends AbstractHttpServer

Implementation of HttpServer that uses Simple Framework to handle requests.

Author:
as 2011.12.27
See Also:
Simple Framework

Nested Class Summary

 

Nested classes/interfaces inherited from class com.tangosol.coherence.rest.server.AbstractHttpServer
AbstractHttpServer.SimpleSecurityContext

 

Field Summary
protected static int DEFAULT_THREAD_COUNT
          Default number of threads to use for request processing.
protected  int m_cThreads
          The number of threads that should be used to serve requests.
protected  org.simpleframework.transport.connect.Connection m_server
          Simple 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

 

Constructor Summary
SimpleHttpServer()
          Construct SimpleHttpServer instance.
SimpleHttpServer(int cThreads)
          Construct SimpleHttpServer instance.

 

Method Summary
protected  org.simpleframework.transport.connect.Connection createSimpleServer()
           
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

 

Field Detail

m_server

protected org.simpleframework.transport.connect.Connection m_server
Simple HTTP server instance.

m_cThreads

protected final int m_cThreads
The number of threads that should be used to serve requests.

Simple uses two thread pools: one to read incoming requests and one to process them. This value applies to both pools, so the number of worker threads created internally by Simple will be double.


DEFAULT_THREAD_COUNT

protected static final int DEFAULT_THREAD_COUNT
Default number of threads to use for request processing.
See Also:
Constant Field Values

Constructor Detail

SimpleHttpServer

public SimpleHttpServer()
Construct SimpleHttpServer instance.

SimpleHttpServer

public SimpleHttpServer(int cThreads)
Construct SimpleHttpServer instance.
Parameters:
cThreads - the number of threads to use for request processing

Method Detail

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

createSimpleServer

protected org.simpleframework.transport.connect.Connection createSimpleServer()
                                                                       throws java.io.IOException
Throws:
java.io.IOException

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

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.