Class EncodeAgentResponse

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

public class EncodeAgentResponse extends AbstractAgentRequestAction
A profile action to encode an agent response from the output DDF in the AgentRequestContext.

This also ensures the final output is a structure, and contains an "event" member, setting it to "success" if not already set, and also populates target from a StateDataContext if available.

If enabled as a feature for the agent, the value of the session ID is also placed in a structure member in the output before encoding to relay it to the agent.

Event:
EventIds.PROCEED_EVENT_ID, EventIds.INVALID_PROFILE_CTX, EventIds.INVALID_MESSAGE, EventIds.IO_ERROR
Postcondition:
AgentRequestContext.getOutput().getmember("event").isstring()