Class CreateOutputMessage

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

public class CreateOutputMessage extends AbstractAgentRequestAction
A profile action to build the "shell" of an Agent response (a DDF), optionally including the RemotedHttpServletResponse.STRUCTURE_NAME member and wrapped response facade to leave subsequent actions with a consistent state to operate on.

As a side effect, this action uses its base class to ensure that the containing AgentRequestContext is also created.

Event:
EventIds.PROCEED_EVENT_ID
Postcondition:
AgentRequestContext.getOutput().isstruct()
  • Field Details

    • overwriteExisting

      private boolean overwriteExisting
      Whether to replace an existing output message if one exists.
    • createServletResponse

      private boolean createServletResponse
      Whether to create the remoted servlet response wrapper.
  • Constructor Details

    • CreateOutputMessage

      public CreateOutputMessage()
      Constructor.
  • Method Details

    • setOverwriteExisting

      public void setOverwriteExisting(boolean flag)
      Sets whether to replace an existing output message if one exists.

      This also applies to the remoted servlet response wrapper if that option is enabled.

      Defaults to false.

      Parameters:
      flag - flag to set
    • setCreateServletResponse

      public void setCreateServletResponse(boolean flag)
      Sets whether to create the remoted servlet response wrapper.

      Defaults to false.

      Parameters:
      flag - flag to set
    • doExecute

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