Command Mediator - User Guide

Command Mediator

The pojoCommand mediator creates an instance of the specified command class - which may implement the org.apache.synapse.Command interface or should have a public void method "public void execute()". If any properties are specified, the corresponding setter methods are invoked on the class before each message is executed. It should be noted that a new instance of the POJO Command class is created to process each message processed. After execution of the POJO Command mediator, depending on the 'action' attribute of the property, the new value returned by a call to the corresponding getter method is stored back to the message or to the context. The 'action' attribute may specify whether this behaviour is expected or not via the Read, Update and ReadAndUpdate properties.

Here are the configuration options related to the Command Mediator.