Package com.helger.phase4.messaging
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
AS4MessagingHelper 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 TypeMethodDescriptioncom.helger.commons.collection.impl.ICommonsList<jakarta.servlet.http.Cookie>cookies()default com.helger.commons.collection.impl.ICommonsList<jakarta.servlet.http.Cookie>com.helger.commons.http.HttpHeaderMapgetMode()Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.Returns 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.Returns the login of the user making this request, if the user has been authenticated, ornullif the user has not been authenticated.default booleandefault booleandefault booleandefault booleandefault booleancom.helger.commons.collection.impl.ICommonsList<X509Certificate>Returns the TLS certificates presented by the remote client 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
- Returns:
- The date and time when the request was received. Never
null.
-
getMode
- Returns:
- The message mode. May be
null.
-
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
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
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
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
@Nullable @ReturnsMutableObject com.helger.commons.collection.impl.ICommonsList<X509Certificate> remoteTlsCerts()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
default boolean hasRemoteTlsCerts()- Returns:
trueif the remote TLS certificate chain with at least a single certificate is present,falseif not.- Since:
- 2.5.0
- See Also:
-
cookies
@Nonnull @ReturnsMutableObject com.helger.commons.collection.impl.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
@Nonnull @ReturnsMutableObject default com.helger.commons.collection.impl.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
- Returns:
- A copy of all the HTTP headers from the incoming request. Never
nullbut maybe empty. - Since:
- 2.7.3
-
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:
-