Top Inners Fields Constructors Methods
org.apache.http.impl.bootstrap

public Class HttpServer

extends Object
Class Inheritance
Imports
java.io.IOException, java.net.InetAddress, .ServerSocket, java.util.Set, java.util.concurrent.SynchronousQueue, .ThreadPoolExecutor, .TimeUnit, java.util.concurrent.atomic.AtomicReference, javax.net.ServerSocketFactory, javax.net.ssl.SSLServerSocket, org.apache.http.ExceptionLogger, .HttpConnectionFactory, .HttpServerConnection, org.apache.http.config.SocketConfig, org.apache.http.impl.DefaultBHttpServerConnection, org.apache.http.protocol.HttpService

Since
4.4

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private final HttpConnectionFactory<? extends DefaultBHttpServerConnection>
private final ExceptionLogger
private final HttpService
private final InetAddress
private final ThreadPoolExecutor
private final int
private volatile RequestListener
private volatile ServerSocket
private final ServerSocketFactory
private final SocketConfig
private final SSLServerSetupHandler
private final AtomicReference<HttpServer.Status>
private final WorkerPoolExecutor
private final ThreadGroup

Constructor Summary

AccessConstructor and Description
pack-priv
HttpServer(final int port, final InetAddress ifAddress, final SocketConfig socketConfig, final ServerSocketFactory serverSocketFactory, final HttpService httpService, final HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory, final SSLServerSetupHandler sslSetupHandler, final ExceptionLogger exceptionLogger)

Method Summary

Modifier and TypeMethod and Description
public void
awaitTermination(final long timeout, final TimeUnit timeUnit)

public InetAddress
public int
public void
shutdown(final long gracePeriod, final TimeUnit timeUnit)

public void
public void
stop()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectionFactoryback to summary
private final HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory
exceptionLoggerback to summary
private final ExceptionLogger exceptionLogger
httpServiceback to summary
private final HttpService httpService
ifAddressback to summary
private final InetAddress ifAddress
listenerExecutorServiceback to summary
private final ThreadPoolExecutor listenerExecutorService
portback to summary
private final int port
requestListenerback to summary
private volatile RequestListener requestListener
serverSocketback to summary
private volatile ServerSocket serverSocket
serverSocketFactoryback to summary
private final ServerSocketFactory serverSocketFactory
socketConfigback to summary
private final SocketConfig socketConfig
sslSetupHandlerback to summary
private final SSLServerSetupHandler sslSetupHandler
statusback to summary
private final AtomicReference<HttpServer.Status> status
workerExecutorServiceback to summary
private final WorkerPoolExecutor workerExecutorService
workerThreadsback to summary
private final ThreadGroup workerThreads

Constructor Detail

HttpServerback to summary
pack-priv HttpServer(final int port, final InetAddress ifAddress, final SocketConfig socketConfig, final ServerSocketFactory serverSocketFactory, final HttpService httpService, final HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory, final SSLServerSetupHandler sslSetupHandler, final ExceptionLogger exceptionLogger)

Method Detail

awaitTerminationback to summary
public void awaitTermination(final long timeout, final TimeUnit timeUnit) throws InterruptedException
getInetAddressback to summary
public InetAddress getInetAddress()
getLocalPortback to summary
public int getLocalPort()
shutdownback to summary
public void shutdown(final long gracePeriod, final TimeUnit timeUnit)
startback to summary
public void start() throws IOException
stopback to summary
public void stop()
org.apache.http.impl.bootstrap back to summary

pack-priv final Enum HttpServer.Status

extends Enum<HttpServer.Status>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final HttpServer.Status
public static final HttpServer.Status
public static final HttpServer.Status

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static HttpServer.Status
public static HttpServer.Status[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ACTIVEback to summary
public static final HttpServer.Status ACTIVE
READYback to summary
public static final HttpServer.Status READY
STOPPINGback to summary
public static final HttpServer.Status STOPPING

Constructor Detail

Statusback to summary
private Status()

Method Detail

valueOfback to summary
public static HttpServer.Status valueOf(String name)
valuesback to summary
public static HttpServer.Status[] values()