Class AS2ClientResponse

java.lang.Object
com.helger.as2lib.client.AS2ClientResponse

public class AS2ClientResponse extends Object
This class contains the basic content that was received from an AS2 server as a response.
Author:
oleo Date: May 12, 2010 Time: 5:53:45 PM, Philip Helger
  • Constructor Details

    • AS2ClientResponse

      public AS2ClientResponse()
      Default constructor.
  • Method Details

    • setOriginalMessageID

      public void setOriginalMessageID(@Nonnull String sOriginalMessageID)
      Set the message ID of the message that was sent out. Any existing value will be overwritten.
      Parameters:
      sOriginalMessageID - The original AS2 message ID. May not be null.
      See Also:
    • getOriginalMessageID

      @Nullable public String getOriginalMessageID()
      Returns:
      The message ID of the original AS2 message. May be null if not set (but never null when using in conjunction with AS2Client).
    • setException

      public void setException(@Nonnull Throwable aThrowable)
      Set an exception that occurred. Any existing value will be overwritten.
      Parameters:
      aThrowable - The raised exception. May not be null.
    • hasException

      public boolean hasException()
      Returns:
      true if an exception is present, false otherwise.
    • getException

      @Nullable public Throwable getException()
      Returns:
      The stored exception. May be null if none is present. This usually means that an MDN is present.
      See Also:
    • setMDN

      public void setMDN(@Nonnull IMessageMDN aMDN)
      Set the retrieved MDN. Any existing value will be overwritten.
      Parameters:
      aMDN - The MDN retrieved. May not be null.
    • hasMDN

      public boolean hasMDN()
      Returns:
      true if an MDN is present, false otherwise.
    • getMDN

      @Nullable public IMessageMDN getMDN()
      Returns:
      The stored MDN. May be null if none is present. Usually this means that an exception is present.
      See Also:
    • getMDNMessageID

      @Nullable public String getMDNMessageID()
      Returns:
      The message ID of the MDN if present, or null if no MDN is present.
      See Also:
    • getMDNText

      @Nullable public String getMDNText()
      Returns:
      The text of the MDN if present, or null if no MDN is present.
      See Also:
    • getMDNDisposition

      @Nullable public String getMDNDisposition()
      Returns:
      The disposition of the MDN if present, or null if no MDN is present.
      See Also:
    • getMDNVerificationCertificate

      @Nullable public X509Certificate getMDNVerificationCertificate()
      Returns:
      The MDN X509 certificate that was retrieved. May be null if the MDN was not signed.
      Since:
      4.4.1
    • setMDNVerificationCertificate

      public void setMDNVerificationCertificate(@Nullable X509Certificate aMDNVerificationCertificate)
      Set the X509 certificate that was used to verify the MDN.
      Parameters:
      aMDNVerificationCertificate - The certificate to be used. May be null.
    • setExecutionDuration

      public void setExecutionDuration(@Nonnull Duration aExecutionDuration)
      Set the execution duration of the client request. Any existing value will be overwritten.
      Parameters:
      aExecutionDuration - The duration to be set. May not be null.
    • hasExecutionDuration

      public boolean hasExecutionDuration()
      Returns:
      true if an execution duration is present, false otherwise.
    • getExecutionDuration

      @Nullable public Duration getExecutionDuration()
      Returns:
      The execution duration or null if not present. When using AS2Client the execution time is always set.
    • getAsString

      @Nonnull public String getAsString()
      Returns:
      The whole client response in a single string for debugging purposes.
    • toString

      public String toString()
      Overrides:
      toString in class Object