public class HttpServer extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
HttpServer.Status |
Modifier and Type | Field and Description |
---|---|
private NHttpConnectionFactory<? extends DefaultNHttpServerConnection> |
connectionFactory |
private ThreadGroup |
dispatchThreads |
private ListenerEndpoint |
endpoint |
private ExceptionLogger |
exceptionLogger |
private InetAddress |
ifAddress |
private DefaultListeningIOReactor |
ioReactor |
private IOReactorConfig |
ioReactorConfig |
private ExecutorService |
listenerExecutorService |
private int |
port |
private NHttpServerEventHandler |
serverEventHandler |
private AtomicReference<HttpServer.Status> |
status |
Constructor and Description |
---|
HttpServer(int port,
InetAddress ifAddress,
IOReactorConfig ioReactorConfig,
NHttpServerEventHandler serverEventHandler,
NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory,
ExceptionLogger exceptionLogger) |
Modifier and Type | Method and Description |
---|---|
void |
awaitTermination(long timeout,
TimeUnit timeUnit) |
ListenerEndpoint |
getEndpoint() |
void |
shutdown(long gracePeriod,
TimeUnit timeUnit) |
void |
start() |
private final int port
private final InetAddress ifAddress
private final IOReactorConfig ioReactorConfig
private final NHttpServerEventHandler serverEventHandler
private final NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory
private final ExceptionLogger exceptionLogger
private final ExecutorService listenerExecutorService
private final ThreadGroup dispatchThreads
private final AtomicReference<HttpServer.Status> status
private final DefaultListeningIOReactor ioReactor
private volatile ListenerEndpoint endpoint
HttpServer(int port, InetAddress ifAddress, IOReactorConfig ioReactorConfig, NHttpServerEventHandler serverEventHandler, NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory, ExceptionLogger exceptionLogger)
public ListenerEndpoint getEndpoint()
public void start() throws IOException
IOException
public void awaitTermination(long timeout, TimeUnit timeUnit) throws InterruptedException
InterruptedException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses