Package com.helger.as2lib.client
Class AS2ClientResponse
java.lang.Object
com.helger.as2lib.client.AS2ClientResponse
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMDN()
boolean
boolean
boolean
hasMDN()
void
setException
(Throwable aThrowable) Set an exception that occurred.void
setExecutionDuration
(Duration aExecutionDuration) Set the execution duration of the client request.void
setMDN
(IMessageMDN aMDN) Set the retrieved MDN.void
setMDNVerificationCertificate
(X509Certificate aMDNVerificationCertificate) Set the X509 certificate that was used to verify the MDN.void
setOriginalMessageID
(String sOriginalMessageID) Set the message ID of the message that was sent out.toString()
-
Constructor Details
-
AS2ClientResponse
public AS2ClientResponse()Default constructor.
-
-
Method Details
-
setOriginalMessageID
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 benull
.- See Also:
-
getOriginalMessageID
- Returns:
- The message ID of the original AS2 message. May be
null
if not set (but nevernull
when using in conjunction withAS2Client
).
-
setException
Set an exception that occurred. Any existing value will be overwritten.- Parameters:
aThrowable
- The raised exception. May not benull
.
-
hasException
public boolean hasException()- Returns:
true
if an exception is present,false
otherwise.
-
getException
- Returns:
- The stored exception. May be
null
if none is present. This usually means that an MDN is present. - See Also:
-
setMDN
Set the retrieved MDN. Any existing value will be overwritten.- Parameters:
aMDN
- The MDN retrieved. May not benull
.
-
hasMDN
public boolean hasMDN()- Returns:
true
if an MDN is present,false
otherwise.
-
getMDN
- Returns:
- The stored MDN. May be
null
if none is present. Usually this means that an exception is present. - See Also:
-
getMDNMessageID
- Returns:
- The message ID of the MDN if present, or
null
if no MDN is present. - See Also:
-
getMDNText
- Returns:
- The text of the MDN if present, or
null
if no MDN is present. - See Also:
-
getMDNDisposition
- Returns:
- The disposition of the MDN if present, or
null
if no MDN is present. - See Also:
-
getMDNVerificationCertificate
- Returns:
- The MDN X509 certificate that was retrieved. May be
null
if the MDN was not signed. - Since:
- 4.4.1
-
setMDNVerificationCertificate
Set the X509 certificate that was used to verify the MDN.- Parameters:
aMDNVerificationCertificate
- The certificate to be used. May benull
.
-
setExecutionDuration
Set the execution duration of the client request. Any existing value will be overwritten.- Parameters:
aExecutionDuration
- The duration to be set. May not benull
.
-
hasExecutionDuration
public boolean hasExecutionDuration()- Returns:
true
if an execution duration is present,false
otherwise.
-
getExecutionDuration
- Returns:
- The execution duration or
null
if not present. When usingAS2Client
the execution time is always set.
-
getAsString
- Returns:
- The whole client response in a single string for debugging purposes.
-
toString
-