public abstract class AbstractCacheServer extends Object implements CacheServer
| Modifier and Type | Field and Description |
|---|---|
private String |
identifier |
private static org.slf4j.Logger |
logger |
private int |
port |
private Set<Thread> |
processInputThreads |
private ServerSocketChannel |
serverSocketChannel |
private SSLContext |
sslContext |
protected boolean |
stopped |
| Constructor and Description |
|---|
AbstractCacheServer(String identifier,
SSLContext sslContext,
int port) |
| Modifier and Type | Method and Description |
|---|---|
int |
getPort() |
protected abstract boolean |
listen(InputStream in,
OutputStream out,
int version)
Listens for incoming data and communicates with remote peer
|
void |
start() |
void |
stop() |
String |
toString() |
private static final org.slf4j.Logger logger
private final String identifier
private final int port
private final SSLContext sslContext
protected volatile boolean stopped
private volatile ServerSocketChannel serverSocketChannel
public AbstractCacheServer(String identifier, SSLContext sslContext, int port)
public int getPort()
getPort in interface CacheServerpublic void start()
throws IOException
start in interface CacheServerIOExceptionpublic void stop()
throws IOException
stop in interface CacheServerIOExceptionprotected abstract boolean listen(InputStream in, OutputStream out, int version) throws IOException
in - inout - outversion - versiontrue if communications should continue, false otherwiseIOException - exCopyright © 2015 Apache NiFi Project. All rights reserved.