Package com.helger.phase4.incoming
Interface IAS4IncomingMessageMetadata
- All Known Implementing Classes:
AS4IncomingMessageMetadata
public interface IAS4IncomingMessageMetadata
This interface lets you access optional metadata for a single incoming message.
See
Note: it does not contain the AS4 message ID or similar parameters, because instance of the class must also be present for incoming messages that are invalid AS4 message and hence have no AS4 message ID.
See
AS4IncomingHelper for a transformation method of this object to a JSON
representation.Note: it does not contain the AS4 message ID or similar parameters, because instance of the class must also be present for incoming messages that are invalid AS4 message and hence have no AS4 message ID.
- Since:
- 0.9.8
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescription@NonNull com.helger.collection.commons.ICommonsList<jakarta.servlet.http.Cookie> cookies()default @NonNull com.helger.collection.commons.ICommonsList<jakarta.servlet.http.Cookie> @NonNull com.helger.http.header.HttpHeaderMap@NonNull OffsetDateTime@NonNull @Nonempty String@NonNull EAS4MessageModegetMode()@Nullable StringReturns the Internet Protocol (IP) address of the client or last proxy that sent the request.@Nullable StringReturns the fully qualified name of the client or the last proxy that sent the request.intReturns the Internet Protocol (IP) source port of the client or last proxy that sent the request.@Nullable StringReturns the login of the user making this request, if the user has been authenticated, ornullif the user has not been authenticated.@Nullable Stringintdefault booleandefault booleandefault booleandefault booleanDeprecated, for removal: This API element is subject to removal in a future version.default booleandefault booleandefault booleanbooleandefault @Nullable com.helger.collection.commons.ICommonsList<X509Certificate> Deprecated, for removal: This API element is subject to removal in a future version.UseremoteTlsClientCerts()instead@Nullable com.helger.collection.commons.ICommonsList<X509Certificate> Returns the TLS certificates presented by the remote client to authenticate itself.@Nullable com.helger.collection.commons.ICommonsList<X509Certificate> Returns the TLS certificates presented by the remote peer to authenticate itself.
-
Method Details
-
getIncomingUniqueID
- Returns:
- A unique ID created just for this message metadata. It can be used to reference to this
message internally. Usually this is a UUID. This is different from the AS4 message ID,
because in case of a corrupted message, the AS4 message ID may be missing or misplaced.
Never
nullnor empty.
-
getIncomingDT
@NonNull OffsetDateTime getIncomingDT()- Returns:
- The date and time when the request was received. Never
null.
-
getMode
@NonNull EAS4MessageMode getMode()- Returns:
- The message mode. May be
null.
-
getRemoteAddr
@Nullable String getRemoteAddr()Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.- Returns:
- a
Stringcontaining the IP address of the client that sent the request
-
hasRemoteAddr
default boolean hasRemoteAddr()- Returns:
trueif the remote address is present,falseif not.- See Also:
-
getRemoteHost
@Nullable String getRemoteHost()Returns the fully qualified name of the client or the last proxy that sent the request. If the engine cannot or chooses not to resolve the hostname (to improve performance), this method returns the dotted-string form of the IP address.- Returns:
- a
Stringcontaining the fully qualified name of the client
-
hasRemoteHost
default boolean hasRemoteHost()- Returns:
trueif the remote host is present,falseif not.- See Also:
-
getRemotePort
@CheckForSigned int getRemotePort()Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request.- Returns:
- an integer specifying the port number or a negative value if not set
-
hasRemotePort
default boolean hasRemotePort()- Returns:
trueif the remote port is present,falseif not.- See Also:
-
getRemoteUser
@Nullable String getRemoteUser()Returns the login of the user making this request, if the user has been authenticated, ornullif the user has not been authenticated. Whether the user name is sent with each subsequent request depends on the browser and type of authentication.- Returns:
- a
Stringspecifying the login of the user making this request, ornullif the user login is not known - Since:
- 0.9.10
-
hasRemoteUser
default boolean hasRemoteUser()- Returns:
trueif the remote user is present,falseif not.- See Also:
-
remoteTlsCerts
@ReturnsMutableObject @Deprecated(forRemoval=true, since="4.5.1") default @Nullable com.helger.collection.commons.ICommonsList<X509Certificate> remoteTlsCerts()Deprecated, for removal: This API element is subject to removal in a future version.UseremoteTlsClientCerts()insteadReturns the TLS certificates presented by the remote client to authenticate itself.- Returns:
- A list containing a chain of X509Certificate objects. Maybe
null. - Since:
- 2.5.0
-
remoteTlsClientCerts
@ReturnsMutableObject @Nullable com.helger.collection.commons.ICommonsList<X509Certificate> remoteTlsClientCerts()Returns the TLS certificates presented by the remote client to authenticate itself.- Returns:
- A list containing a chain of X509Certificate objects. Maybe
null. - Since:
- 2.5.0
-
hasRemoteTlsCerts
Deprecated, for removal: This API element is subject to removal in a future version.UsehasRemoteTlsClientCerts()instead- Returns:
trueif the remote TLS certificate chain with at least a single certificate is present,falseif not.- Since:
- 2.5.0
- See Also:
-
hasRemoteTlsClientCerts
default boolean hasRemoteTlsClientCerts()- Returns:
trueif the remote TLS certificate chain with at least a single certificate is present,falseif not.- Since:
- 2.5.0
- See Also:
-
remoteTlsPeerCerts
@ReturnsMutableObject @Nullable com.helger.collection.commons.ICommonsList<X509Certificate> remoteTlsPeerCerts()Returns the TLS certificates presented by the remote peer to authenticate itself.- Returns:
- A list containing a chain of X509Certificate objects. Maybe
null. - Since:
- 4.5.1
-
hasRemoteTlsPeerCerts
default boolean hasRemoteTlsPeerCerts()- Returns:
trueif the remote peer TLS certificate chain with at least a single certificate is present,falseif not.- Since:
- 4.5.1
- See Also:
-
cookies
@ReturnsMutableObject @NonNull com.helger.collection.commons.ICommonsList<jakarta.servlet.http.Cookie> cookies()- Returns:
- A list of all Cookies contained in the request. Never
nullbut maybe empty. The returned list is mutable so handle with care. - Since:
- 0.9.10
-
getAllCookies
@ReturnsMutableObject default @NonNull com.helger.collection.commons.ICommonsList<jakarta.servlet.http.Cookie> getAllCookies()- Returns:
- A copy of the list of all Cookies contained in the request. Never
nullbut maybe empty. - Since:
- 2.7.3
-
getAllHttpHeaders
@ReturnsMutableCopy @NonNull com.helger.http.header.HttpHeaderMap getAllHttpHeaders()- Returns:
- A copy of all the HTTP headers from the incoming request. Never
nullbut maybe empty. - Since:
- 2.7.3
-
getRequestMessageID
@Nullable String getRequestMessageID()- Returns:
- The AS4 message ID of the request message. This field is always
nullfor a request. This field is always non-nullfor a response. - Since:
- 1.4.2
- See Also:
-
getResponseHttpStatusCode
@CheckForSigned int getResponseHttpStatusCode()- Returns:
- The HTTP status code to be returned. All values ≤ 0 means: undefined.
- Since:
- 4.2.0
-
hasResponseHttpStatusCode
boolean hasResponseHttpStatusCode()- Returns:
trueif a defined HTTP status code is present,falseotherwise.- Since:
- 4.2.0
-
hasRemoteTlsClientCerts()instead