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(@NonNull AS4ClientBuiltMessage aBuiltMsg, @Nullable com.helger.collection.commons.ICommonsList<X509Certificate> aRemoteTlsPeerCerts, @Nullable org.apache.hc.core5.http.message.StatusLine aResponseStatusLine, @NonNull com.helger.http.header.HttpHeaderMap aResponseHeaders, @Nullable T aResponseContent) protectedAS4ClientSentMessage(@NonNull AS4ClientBuiltMessage aBuiltMsg, @Nullable com.helger.collection.commons.ICommonsList<X509Certificate> aRemoteTlsPeerCerts, @Nullable org.apache.hc.core5.http.message.StatusLine aResponseStatusLine, @NonNull com.helger.http.header.HttpHeaderMap aResponseHeaders, @Nullable T aResponseContent, @NonNull OffsetDateTime aSentDateTime) AS4ClientSentMessage(@NonNull AS4ClientBuiltMessage aBuiltMsg, @Nullable org.apache.hc.core5.http.message.StatusLine aResponseStatusLine, @NonNull com.helger.http.header.HttpHeaderMap aResponseHeaders, @Nullable T aResponseContent) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionfinal @NonNull AS4ClientBuiltMessagefinal @NonNull @Nonempty Stringfinal @Nullable com.helger.collection.commons.ICommonsList<X509Certificate> final @Nullable Tfinal @NonNull com.helger.http.header.HttpHeaderMapfinal @Nullable org.apache.hc.core5.http.message.StatusLinefinal @NonNull OffsetDateTimefinal booleanfinal booleantoString()
-
Constructor Details
-
AS4ClientSentMessage
@Deprecated(forRemoval=true, since="4.5.1") public AS4ClientSentMessage(@NonNull AS4ClientBuiltMessage aBuiltMsg, @Nullable org.apache.hc.core5.http.message.StatusLine aResponseStatusLine, @NonNull com.helger.http.header.HttpHeaderMap aResponseHeaders, @Nullable T aResponseContent) Deprecated, for removal: This API element is subject to removal in a future version.- 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
public AS4ClientSentMessage(@NonNull AS4ClientBuiltMessage aBuiltMsg, @Nullable com.helger.collection.commons.ICommonsList<X509Certificate> aRemoteTlsPeerCerts, @Nullable org.apache.hc.core5.http.message.StatusLine aResponseStatusLine, @NonNull com.helger.http.header.HttpHeaderMap aResponseHeaders, @Nullable T aResponseContent) - Parameters:
aBuiltMsg- The built message with headers, payload and message ID. May not benull.aRemoteTlsPeerCerts- The remote TLS server certificates captured during the HTTPS handshake. May 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 com.helger.collection.commons.ICommonsList<X509Certificate> aRemoteTlsPeerCerts, @Nullable org.apache.hc.core5.http.message.StatusLine aResponseStatusLine, @NonNull com.helger.http.header.HttpHeaderMap aResponseHeaders, @Nullable T aResponseContent, @NonNull OffsetDateTime aSentDateTime) - Parameters:
aBuiltMsg- The built message with headers, payload and message ID. May not benull.aRemoteTlsPeerCerts- The remote TLS server certificates captured during the HTTPS handshake. May 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 AS4 message ID of the sent out message. Neither
nullnor empty. This is a shortcut forgetBuiltMessage().getMessageID ().
-
getRemoteTlsPeerCerts
@ReturnsMutableObject public final @Nullable com.helger.collection.commons.ICommonsList<X509Certificate> getRemoteTlsPeerCerts()- Returns:
- The remote TLS server certificate chain captured during the HTTPS handshake (index 0 =
leaf/server certificate). May be
nullif no certificates were captured (e.g. plain HTTP, connection reuse without new handshake). - Since:
- 4.5.1
-
getResponseStatusLine
public final @Nullable org.apache.hc.core5.http.message.StatusLine 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
- See Also:
-
hasResponseStatusLine
public final boolean hasResponseStatusLine()- Returns:
trueif a response status line is present,falseif not.- Since:
- 0.13.0
- See Also:
-
getResponseHeaders
public final @NonNull com.helger.http.header.HttpHeaderMap getResponseHeaders()- Returns:
- The HTTP response headers as a mutable map. Never
null. - Since:
- 0.13.0
-
getResponseContent
- Returns:
- The response payload. May be
null. - See Also:
-
hasResponseContent
public final boolean hasResponseContent()- Returns:
trueif a response payload is present,falseif not.- See Also:
-
getSentDateTime
- Returns:
- The sent date time. Never
null. - Since:
- 0.10.0
-
toString
-