Class AbstractClientConnectionHandler

java.lang.Object
org.jppf.client.AbstractClientConnectionHandler
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
AbstractClassServerDelegate, TaskServerConnectionHandler

public abstract class AbstractClientConnectionHandler extends Object
Common abstract superclass for client connections to a server.
Author:
Laurent Cohen, Jeff Rosen
  • Constructor Details

    • AbstractClientConnectionHandler

      protected AbstractClientConnectionHandler(JPPFClientConnection owner, String name)
      Initialize this connection with the specified owner.
      Parameters:
      owner - the client connection which owns this connection handler.
      name - the name given to this connection.
  • Method Details

    • getSocketClient

      public org.jppf.comm.socket.SocketWrapper getSocketClient() throws Exception
      Get the socket client used to communicate over a socket connection.
      Returns:
      a SocketWrapper instance.
      Throws:
      Exception - if any error occurs.
    • createSSLConnection

      protected void createSSLConnection() throws Exception
      Create the ssl connection over an established plain connection.
      Throws:
      Exception - if any error occurs.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • isClosed

      public boolean isClosed()
    • getSocketInitializer

      public org.jppf.comm.socket.SocketInitializer getSocketInitializer()
      Get the object that performs connection attempts until the max retry time is reached or connection succeeds.
      Returns:
      a SocketInitializer instance.
    • init

      void init() throws Exception
      Initialize the connection.
      Throws:
      Exception - if an error is raised while initializing the connection.
    • initSocketClient

      void initSocketClient() throws Exception
      Initialize the underlying socket connection of this connection handler.
      Throws:
      Exception - if an error is raised during initialization.