public class SimpleHttpServer extends AbstractHttpServer
HttpServer that uses Simple Framework to handle requests.AbstractHttpServer.SimpleSecurityContext| Modifier and Type | Field and Description |
|---|---|
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.
|
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_cacheProvider, m_fStarted, m_identityAsserter, m_mapResourceConfig, m_nPort, m_sAddr, m_sAuthMethod, m_serviceParent, m_socketProvider| Constructor and Description |
|---|
SimpleHttpServer()
Construct SimpleHttpServer instance.
|
SimpleHttpServer(int cThreads)
Construct SimpleHttpServer instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.simpleframework.transport.connect.Connection |
createSimpleServer() |
protected Object |
instantiateContainer(org.glassfish.jersey.server.ResourceConfig config, org.glassfish.hk2.api.ServiceLocator locator)
Factory method for Jersey container instances.
|
protected void |
startInternal()
Start the server.
|
protected void |
stopInternal()
Stop the server.
|
authenticate, createContainer, getCacheProvider, getIdentityAsserter, getLocalAddress, getLocalPort, getParentService, getResourceConfig, getSocketProvider, getSSLContext, getSSLParameters, getSubjectFromSession, handleRequest, isAuthMethodBasic, isAuthMethodCert, isAuthMethodNone, isSecure, setAuthMethod, setCacheProvider, setIdentityAsserter, setLocalAddress, setLocalPort, setParentService, setResourceConfig, setResourceConfig, setSocketProvider, start, stop, toStringprotected org.simpleframework.transport.connect.Connection m_server
protected final int m_cThreads
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.
protected static final int DEFAULT_THREAD_COUNT
public SimpleHttpServer()
public SimpleHttpServer(int cThreads)
cThreads - the number of threads to use for request processing
protected void startInternal()
throws IOException
startInternal in class AbstractHttpServerIOException - if an error occurs
protected void stopInternal()
throws IOException
stopInternal in class AbstractHttpServerIOException - if an error occurs
protected org.simpleframework.transport.connect.Connection createSimpleServer()
throws javax.ws.rs.ProcessingException
javax.ws.rs.ProcessingExceptionprotected Object instantiateContainer(org.glassfish.jersey.server.ResourceConfig config, org.glassfish.hk2.api.ServiceLocator locator)
AbstractHttpServerinstantiateContainer in class AbstractHttpServerconfig - the resource configurationlocator - the parent service locator