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, List<String> diagnosticLog)
      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.
      diagnosticLog - ordered log lines accumulated during the authentication attempt.
    • FailedOutgoingServerSessionAttempt

      public FailedOutgoingServerSessionAttempt(String localDomain, String remoteDomain, Instant when, String errorType, String errorMessage)
      Constructs diagnostics for one failed outgoing S2S connection establishment attempt without a diagnostic log.
      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.
    • getDiagnosticLog

      public List<String> getDiagnosticLog()
      Returns an ordered, human-readable log of the steps taken during the authentication attempt.
      Returns:
      an unmodifiable, ordered list of diagnostic log lines; never null.
    • from

      public static FailedOutgoingServerSessionAttempt from(String localDomain, String remoteDomain, Throwable cause, List<String> diagnosticLog)
      Creates diagnostics payload for a failed outgoing S2S connection attempt, including the structured diagnostic log from the authentication 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.
      diagnosticLog - ordered log lines accumulated during the attempt.
      Returns:
      a diagnostics payload representing the provided failure.
    • 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.