Class 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 Detail

      • AS2ClientResponse

        public AS2ClientResponse()
        Default constructor.
    • Method Detail

      • 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:
        IBaseMessage.getMessageID()
      • 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.
      • 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.
      • getMDNMessageID

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

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

        @Nullable
        public String getMDNDisposition()
        Returns:
        The disposition of the MDN if present, or null if no MDN is present.
        See Also:
        hasMDN()
      • 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.