public class NioServer extends AbstractExecutionThreadService
StreamParser
to
process data.Service.Listener, Service.State
Constructor and Description |
---|
NioServer(StreamParserFactory parserFactory,
InetSocketAddress bindAddress)
Creates a new server which is capable of listening for incoming connections and processing client provided data
using
StreamParser s created by the given StreamParserFactory |
Modifier and Type | Method and Description |
---|---|
protected void |
run() |
void |
triggerShutdown()
Invoked by the Execution service when it's time to stop.
|
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, shutDown, start, startAndWait, startAsync, startUp, state, stop, stopAndWait, stopAsync, toString
public NioServer(StreamParserFactory parserFactory, InetSocketAddress bindAddress) throws IOException
StreamParser
s created by the given StreamParserFactory
IOException
- If there is an issue opening the server socket or binding fails for some reasonprotected void run() throws Exception
run
in class AbstractExecutionThreadService
Exception
public void triggerShutdown()
AbstractExecutionThreadService.stop()
instead.triggerShutdown
in class AbstractExecutionThreadService
Copyright © 2014. All rights reserved.