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,
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.
|
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, Callback<SSLParameters> sslSetupHandler, ExceptionListener exceptionListener)
public InetAddress getInetAddress()
public int getLocalPort()
public void start() throws IOException
IOException
public void stop()
public void initiateShutdown()
public void awaitTermination(TimeValue waitTime) throws InterruptedException
InterruptedException
public void close(CloseMode closeMode)
ModalCloseable
close
in interface ModalCloseable
closeMode
- How to close the receiver.public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.