Package org.jppf.server.nio.heartbeat
Class HeartbeatNioServer
java.lang.Object
java.lang.Thread
org.jppf.nio.NioServer
org.jppf.nio.StatelessNioServer<org.jppf.server.nio.heartbeat.HeartbeatContext>
org.jppf.server.nio.heartbeat.HeartbeatNioServer
- All Implemented Interfaces:
Runnable
public final class HeartbeatNioServer
extends org.jppf.nio.StatelessNioServer<org.jppf.server.nio.heartbeat.HeartbeatContext>
The NIO server that handles heartbeat connections.
- Author:
- Laurent Cohen
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jppf.nio.StatelessNioServer
org.jppf.nio.StatelessNioServer.ContextAction<C extends org.jppf.nio.AbstractNioContext>, org.jppf.nio.StatelessNioServer.ContextFilter<C extends org.jppf.nio.AbstractNioContext>, org.jppf.nio.StatelessNioServer.KeysetHandler<C extends org.jppf.nio.AbstractNioContext>Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class org.jppf.nio.StatelessNioServer
acceptHandler, messageReader, messageWriter, readHandler, writeHandlerFields inherited from class org.jppf.nio.NioServer
attachment, configuration, identifier, requestShutdown, selecting, selector, selectTimeout, sslContext, sslHelper, stopped, sync, wakeUpActionFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ServerSocketChannel serverSocketChannel, SocketChannel channel, org.jppf.nio.SSLHandler sslHandler, boolean ssl, boolean peer, Object... params) org.jppf.server.nio.heartbeat.HeartbeatContextcreateNioContext(Object... params) org.jppf.server.nio.heartbeat.HeartbeatMessageHandlerprotected voidprotected voidprotected voidvoidMethods inherited from class org.jppf.nio.StatelessNioServer
doOperation, getAllContexts, go, handleRead, handleWrite, init, isKeyValid, performContextAction, registerChannel, run, toString, toString, updateInterestOps, updateInterestOpsNoWakeupMethods inherited from class org.jppf.nio.NioServer
addServer, configurePeerSSL, configureSSLEngine, createSSLContext, doAccept, end, externalStopCondition, getConfiguration, getIdentifier, getSelector, isStopped, removeServer, setConfiguration, shutdown, wakeUpSelectorIfNeededMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, yield
-
Constructor Details
-
HeartbeatNioServer
- Parameters:
driver- reference to the driver.identifier- the channel identifier for channels handled by this server.useSSL- determines whether an SSLContext should be created for this server.- Throws:
Exception- if any error occurs.
-
-
Method Details
-
handleSelectionException
- Specified by:
handleSelectionExceptionin classorg.jppf.nio.StatelessNioServer<org.jppf.server.nio.heartbeat.HeartbeatContext>
-
accept
public void accept(ServerSocketChannel serverSocketChannel, SocketChannel channel, org.jppf.nio.SSLHandler sslHandler, boolean ssl, boolean peer, Object... params) - Specified by:
acceptin classorg.jppf.nio.NioServer
-
createNioContext
- Specified by:
createNioContextin classorg.jppf.nio.NioServer
-
removeAllConnections
public void removeAllConnections()- Overrides:
removeAllConnectionsin classorg.jppf.nio.NioServer
-
getMessageHandler
public org.jppf.server.nio.heartbeat.HeartbeatMessageHandler getMessageHandler()- Returns:
- the message handler for this server.
-
initReaderAndWriter
protected void initReaderAndWriter()- Specified by:
initReaderAndWriterin classorg.jppf.nio.StatelessNioServer<org.jppf.server.nio.heartbeat.HeartbeatContext>
-
initNioHandlers
protected void initNioHandlers()- Overrides:
initNioHandlersin classorg.jppf.nio.StatelessNioServer<org.jppf.server.nio.heartbeat.HeartbeatContext>
-