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 ExceptionLogger
private final HttpService
private final InetAddress
private final ThreadPoolExecutor
private final int
private RequestListener
private ServerSocket
private final ServerSocketFactory
private final SocketConfig
private final SSLServerSetupHandler
private final AtomicReference
<HttpServer.Status> private final WorkerPoolExecutor
private 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 TypeMethodDescriptionvoid
awaitTermination
(long timeout, TimeUnit timeUnit) int
void
void
start()
void
stop()
-
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
-