public class NioServer
extends com.google.common.util.concurrent.AbstractExecutionThreadService
StreamParser
to
process data.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 com.google.common.util.concurrent.AbstractExecutionThreadService
Exception
public void triggerShutdown()
AbstractExecutionThreadService.stop()
instead.triggerShutdown
in class com.google.common.util.concurrent.AbstractExecutionThreadService
Copyright © 2015. All rights reserved.