Class DecodeAgentRequest

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, ProfileAction, Aware, MessageSource, MessageSourceAware, Action

public class DecodeAgentRequest extends AbstractAgentAction
A profile action to decode an agent request and stash the resulting DDF in the AgentRequestContext.

The MIME type in the request is used to determine what form of parsing and deserialization to use. The only supported type at present is "text/plain" representing a record-oriented syntax.

If the input message is a structure containing an "http" member, then a wrapped HttpServletRequest object backed by the input message is constructed and stored in the AgentRequestContext.

Event:
EventIds.PROCEED_EVENT_ID, EventIds.INVALID_PROFILE_CTX, EventIds.INVALID_MESSAGE
Postcondition:
ProfileRequestContext.ensureSubcontext(AgentRequestContext.class).getInput() != null
  • Field Details

    • APPLICATION_ID_MDC_ATTRIBUTE

      @Nonnull @NotEmpty public static final String APPLICATION_ID_MDC_ATTRIBUTE
      MDC attribute name for application ID.
      See Also:
    • TX_ID_MDC_ATTRIBUTE

      @Nonnull @NotEmpty public static final String TX_ID_MDC_ATTRIBUTE
      MDC attribute name for transaction ID.
      See Also:
    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • populateMDC

      private boolean populateMDC
      Whether to populate the MDC.
  • Constructor Details

    • DecodeAgentRequest

      public DecodeAgentRequest()
      Constructor.
  • Method Details

    • setPopulateMDC

      public void setPopulateMDC(boolean flag)
      Sets whether to populate the application and tx IDs into the logging MDC.

      Defaults to true.

      Parameters:
      flag - flag to set
    • doExecute

      protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
      Overrides:
      doExecute in class AbstractProfileAction