Package org.apache.http.impl.bootstrap
Class HttpServer
java.lang.Object
org.apache.http.impl.bootstrap.HttpServer
- Since:
- 4.4
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HttpConnectionFactory<? extends DefaultBHttpServerConnection>private final ExceptionLoggerprivate final HttpServiceprivate final InetAddressprivate final ThreadPoolExecutorprivate final intprivate RequestListenerprivate ServerSocketprivate final ServerSocketFactoryprivate final SocketConfigprivate final SSLServerSetupHandlerprivate final AtomicReference<HttpServer.Status>private final WorkerPoolExecutorprivate final ThreadGroup -
Constructor Summary
ConstructorsConstructorDescriptionHttpServer(int port, InetAddress ifAddress, SocketConfig socketConfig, ServerSocketFactory serverSocketFactory, HttpService httpService, HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory, SSLServerSetupHandler sslSetupHandler, ExceptionLogger exceptionLogger) -
Method Summary
Modifier and TypeMethodDescriptionvoidawaitTermination(long timeout, TimeUnit timeUnit) intvoidvoidstart()voidstop()
-
Field Details
-
port
private final int port -
ifAddress
-
socketConfig
-
serverSocketFactory
-
httpService
-
connectionFactory
-
sslSetupHandler
-
exceptionLogger
-
listenerExecutorService
-
workerThreads
-
workerExecutorService
-
status
-
serverSocket
-
requestListener
-
-
Constructor Details
-
HttpServer
HttpServer(int port, InetAddress ifAddress, SocketConfig socketConfig, ServerSocketFactory serverSocketFactory, HttpService httpService, HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory, SSLServerSetupHandler sslSetupHandler, ExceptionLogger exceptionLogger)
-
-
Method Details
-
getInetAddress
-
getLocalPort
public int getLocalPort() -
start
- Throws:
IOException
-
stop
public void stop() -
awaitTermination
- Throws:
InterruptedException
-
shutdown
-