Package com.helger.phase4.client
Class AS4ClientSentMessage<T>
java.lang.Object
com.helger.phase4.client.AS4ClientSentMessage<T>
- Type Parameters:
T- The response type
This class correlates the built source message
(
AS4ClientBuiltMessage) with the HTTP response of the passed type
(T).- Author:
- Philip Helger
-
Constructor Summary
ConstructorsModifierConstructorDescriptionAS4ClientSentMessage(AS4ClientBuiltMessage aBuiltMsg, org.apache.hc.core5.http.message.StatusLine aResponseStatusLine, com.helger.commons.http.HttpHeaderMap aResponseHeaders, T aResponseContent) protectedAS4ClientSentMessage(AS4ClientBuiltMessage aBuiltMsg, org.apache.hc.core5.http.message.StatusLine aResponseStatusLine, com.helger.commons.http.HttpHeaderMap aResponseHeaders, T aResponseContent, OffsetDateTime aSentDateTime) -
Method Summary
Modifier and TypeMethodDescriptionfinal AS4ClientBuiltMessagefinal Stringfinal Tfinal com.helger.commons.http.HttpHeaderMapfinal org.apache.hc.core5.http.message.StatusLinefinal OffsetDateTimefinal booleanfinal booleantoString()
-
Constructor Details
-
AS4ClientSentMessage
public AS4ClientSentMessage(@Nonnull AS4ClientBuiltMessage aBuiltMsg, @Nullable org.apache.hc.core5.http.message.StatusLine aResponseStatusLine, @Nonnull com.helger.commons.http.HttpHeaderMap aResponseHeaders, @Nullable T aResponseContent) - Parameters:
aBuiltMsg- The built message with headers, payload and message ID. May not benull.aResponseStatusLine- The HTTP response status line. May benull.aResponseHeaders- The HTTP response header. May not benull.aResponseContent- The response payload. May benull.
-
AS4ClientSentMessage
protected AS4ClientSentMessage(@Nonnull AS4ClientBuiltMessage aBuiltMsg, @Nullable org.apache.hc.core5.http.message.StatusLine aResponseStatusLine, @Nonnull com.helger.commons.http.HttpHeaderMap aResponseHeaders, @Nullable T aResponseContent, @Nonnull OffsetDateTime aSentDateTime) - Parameters:
aBuiltMsg- The built message with headers, payload and message ID. May not benull.aResponseStatusLine- The HTTP response status line. May benull.aResponseHeaders- The HTTP response header. May not benull.aResponseContent- The response payload. May benull.aSentDateTime- The sending date time. May not benull.
-
-
Method Details
-
getBuiltMessage
- Returns:
- The built message as provided in the constructor. Never
null.
-
getMessageID
- Returns:
- The message ID of the sent out message. Neither
nullnor empty. This is a shortcut forgetBuiltMessage().getMessageID ().
-
getResponseStatusLine
- Returns:
- The HTTP response status line. It contains the HTTP version, the
response code and the response reason (if present). May be
null. - Since:
- 0.13.0
-
hasResponseStatusLine
public final boolean hasResponseStatusLine()- Returns:
trueif a response status line is present,falseif not.- Since:
- 0.13.0
-
getResponseHeaders
- Returns:
- The HTTP response headers as a mutable map. Never
null. - Since:
- 0.13.0
-
getResponse
- Returns:
- The response payload. May be
null.
-
hasResponse
public final boolean hasResponse()- Returns:
trueif a response payload is present,falseif not.
-
getSentDateTime
- Returns:
- The sent date time. Never
null. - Since:
- 0.10.0
-
toString
-