Class SCMPMessageFault

java.lang.Object
org.serviceconnector.scmp.SCMPMessage
org.serviceconnector.scmp.SCMPMessageFault
All Implemented Interfaces:
Serializable

public class SCMPMessageFault extends SCMPMessage
The Class SCMPMessageFault. Indicates an error and causes the SCMPHeadlineKey.EXC on the wire protocol.
See Also:
  • Constructor Details

    • SCMPMessageFault

      public SCMPMessageFault(SCMPVersion scmpVersion)
      Instantiates a new SCMP fault.
      Parameters:
      scmpVersion - the SCMP version
    • SCMPMessageFault

      public SCMPMessageFault(SCMPVersion scmpVersion, SCMPError error, String additionalInfo)
      Instantiates a new SCMP fault message.
      Parameters:
      scmpVersion - the SCMP version
      error - the error code
      additionalInfo - the additional info
    • SCMPMessageFault

      public SCMPMessageFault(SCMPVersion scmpVersion, Exception exception, SCMPError error)
      Instantiates a new SCMP fault.
      Parameters:
      exception - the exception
      error - the error
  • Method Details

    • getCause

      public Exception getCause()
      Gets the cause.
      Returns:
      the exception
    • setLocalDateTime

      public void setLocalDateTime()
      Sets the local date time.
    • isFault

      public boolean isFault()
      Checks if the message is a fault.
      Overrides:
      isFault in class SCMPMessage
      Returns:
      true, if is fault
    • isReply

      public boolean isReply()
      Checks if this message is a reply.
      Overrides:
      isReply in class SCMPMessage
      Returns:
      true, if is reply
    • setError

      public void setError(String errorCode, String errorText)
      Sets the error code and text.
      Parameters:
      errorCode - the error code
      errorText - the error text
    • setError

      public void setError(SCMPError scmpError, String additionalInfo)
      Sets the error.
      Parameters:
      scmpError - the scmp error
      additionalInfo - the additional info
    • setError

      public void setError(SCMPError scmpError)
      Sets the error code and text based on scmp error.
      Parameters:
      scmpError - the new error code
    • toString

      public String toString()
      Overrides:
      toString in class SCMPMessage