Class FailedOutgoingServerSessionAttempt

java.lang.Object
org.jivesoftware.openfire.server.FailedOutgoingServerSessionAttempt
All Implemented Interfaces:
Serializable

public class FailedOutgoingServerSessionAttempt extends Object implements Serializable
Basic diagnostics for a failed outgoing server-to-server connection attempt. Instances of this type are intended to be stored in a clustered cache, which requires that keys and values are serializable.
See Also:
  • Constructor Details

    • FailedOutgoingServerSessionAttempt

      public FailedOutgoingServerSessionAttempt(String localDomain, String remoteDomain, Instant when, String errorType, String errorMessage)
      Constructs diagnostics for one failed outgoing S2S connection establishment attempt.
      Parameters:
      localDomain - the local domain from which the outgoing attempt was initiated.
      remoteDomain - the remote peer domain that connection establishment targeted.
      when - timestamp that indicates when the failure was observed.
      errorType - fully qualified class name of the throwable that caused the failure, or null.
      errorMessage - throwable message that describes the failure, or null.
  • Method Details

    • getLocalDomain

      public String getLocalDomain()
      Returns:
      the local domain from which the outgoing attempt was initiated.
    • getRemoteDomain

      public String getRemoteDomain()
      Returns:
      the remote domain for which connection establishment failed.
    • getWhen

      public Instant getWhen()
      Returns:
      timestamp of when this failure was recorded.
    • getErrorType

      public String getErrorType()
      Returns:
      fully qualified class name of the exception that caused the failure, or null.
    • getErrorMessage

      public String getErrorMessage()
      Returns:
      message associated with the exception that caused the failure, or null.
    • from

      public static FailedOutgoingServerSessionAttempt from(String localDomain, String remoteDomain, Throwable cause)
      Creates diagnostics payload for a failed outgoing S2S connection attempt.
      Parameters:
      localDomain - the local domain from which the outgoing attempt was initiated.
      remoteDomain - the remote domain that connection establishment targeted.
      cause - the failure cause.
      Returns:
      a diagnostics payload representing the provided failure.