Class ConnectionContext

java.lang.Object
org.jppf.node.connection.ConnectionContext

public class ConnectionContext extends Object
Instances of this class define the context for a node (re)connection request.
Since:
4.1
Author:
Laurent Cohen
  • Constructor Details

    • ConnectionContext

      public ConnectionContext(String message, Throwable throwable, ConnectionReason reason)
      Initialize this context with the specified parameters.
      Parameters:
      message - some explanation text for the reconnection.
      throwable - a Throwable that triggered the reconnection.
      reason - the reason for the connection or reconnection.
  • Method Details

    • getMessage

      public String getMessage()
      Get an explanation text for the reconnection.
      Returns:
      the explanation as a string, possibly null.
    • getThrowable

      public Throwable getThrowable()
      Get an eventual Throwable that triggered the reconnection.
      Returns:
      a Throwable, possibly null.
    • getReason

      public ConnectionReason getReason()
      Get the reason for the connection or reconnection.
      Returns:
      the reason as a ConnectionReason enum value.
    • toString

      public String toString()
      Overrides:
      toString in class Object