public class HttpServer extends Object implements ModalCloseable
| Constructor and Description |
|---|
HttpServer(int port,
HttpService httpService,
InetAddress ifAddress,
SocketConfig socketConfig,
ServerSocketFactory serverSocketFactory,
HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory,
SSLContext sslContext,
Callback<SSLParameters> sslSetupHandler,
ExceptionListener exceptionListener) |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitTermination(TimeValue waitTime) |
void |
close() |
void |
close(CloseMode closeMode)
Closes this process or endpoint and releases any system resources associated
with it.
|
void |
close(CloseMode closeMode,
Timeout timeout)
Closes this process or endpoint and releases any system resources associated
with it.
|
InetAddress |
getInetAddress() |
int |
getLocalPort() |
void |
initiateShutdown() |
void |
start() |
void |
stop() |
@Internal public HttpServer(int port, HttpService httpService, InetAddress ifAddress, SocketConfig socketConfig, ServerSocketFactory serverSocketFactory, HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory, SSLContext sslContext, Callback<SSLParameters> sslSetupHandler, ExceptionListener exceptionListener)
public InetAddress getInetAddress()
public int getLocalPort()
public void start()
throws IOException
IOExceptionpublic void stop()
public void initiateShutdown()
public void awaitTermination(TimeValue waitTime) throws InterruptedException
InterruptedExceptionpublic void close(CloseMode closeMode)
ModalCloseableclose in interface ModalCloseablecloseMode - How to close the receiver.public void close(CloseMode closeMode, Timeout timeout)
closeMode - How to close the receiver.timeout - How long to wait for the HttpServer to close gracefully.public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.