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
  • Constructor Details

    • HeartbeatNioServer

      public HeartbeatNioServer(JPPFDriver driver, int identifier, boolean useSSL) throws Exception
      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

      protected void handleSelectionException(SelectionKey key, Exception e)
      Specified by:
      handleSelectionException in class org.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:
      accept in class org.jppf.nio.NioServer
    • createNioContext

      public org.jppf.server.nio.heartbeat.HeartbeatContext createNioContext(Object... params)
      Specified by:
      createNioContext in class org.jppf.nio.NioServer
    • removeAllConnections

      public void removeAllConnections()
      Overrides:
      removeAllConnections in class org.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:
      initReaderAndWriter in class org.jppf.nio.StatelessNioServer<org.jppf.server.nio.heartbeat.HeartbeatContext>
    • initNioHandlers

      protected void initNioHandlers()
      Overrides:
      initNioHandlers in class org.jppf.nio.StatelessNioServer<org.jppf.server.nio.heartbeat.HeartbeatContext>