Interface IAS4IncomingMessageMetadata

All Known Implementing Classes:
AS4IncomingMessageMetadata

public interface IAS4IncomingMessageMetadata
This interface lets you access optional metadata for a single incoming message.
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 Details

    • getIncomingUniqueID

      @Nonempty @NonNull @Nonempty String 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 null nor 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 String containing the IP address of the client that sent the request
    • hasRemoteAddr

      default boolean hasRemoteAddr()
      Returns:
      true if the remote address is present, false if 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 String containing the fully qualified name of the client
    • hasRemoteHost

      default boolean hasRemoteHost()
      Returns:
      true if the remote host is present, false if 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:
      true if the remote port is present, false if not.
      See Also:
    • getRemoteUser

      @Nullable String getRemoteUser()
      Returns the login of the user making this request, if the user has been authenticated, or null if 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 String specifying the login of the user making this request, or null if the user login is not known
      Since:
      0.9.10
    • hasRemoteUser

      default boolean hasRemoteUser()
      Returns:
      true if the remote user is present, false if 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.
      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
    • 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(forRemoval=true, since="4.5.1") default boolean hasRemoteTlsCerts()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      true if the remote TLS certificate chain with at least a single certificate is present, false if not.
      Since:
      2.5.0
      See Also:
    • hasRemoteTlsClientCerts

      default boolean hasRemoteTlsClientCerts()
      Returns:
      true if the remote TLS certificate chain with at least a single certificate is present, false if 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:
      true if the remote peer TLS certificate chain with at least a single certificate is present, false if 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 null but 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 null but 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 null but maybe empty.
      Since:
      2.7.3
    • getRequestMessageID

      @Nullable String getRequestMessageID()
      Returns:
      The AS4 message ID of the request message. This field is always null for a request. This field is always non-null for 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:
      true if a defined HTTP status code is present, false otherwise.
      Since:
      4.2.0