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

      @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

      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

      @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:
      true if the remote TLS certificate chain with at least a single certificate is present, false if 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 null but 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 null but maybe empty.
      Since:
      2.7.3
    • getAllHttpHeaders

      @Nonnull @ReturnsMutableCopy com.helger.commons.http.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: