Class POJOCommandMediator

  • All Implemented Interfaces:
    AspectConfigurable, Mediator, SynapseArtifact
    Direct Known Subclasses:
    AnnotatedCommandMediator

    public class POJOCommandMediator
    extends AbstractMediator
    This mediator will use the specified command object and execute the command after setting the properties specified to it through the configuraiton. The specified command object may or may not implement the Command interface. If the Command object has not implemented the Command interface then this will use reflection to find a method called execute() and execute it.
    See Also:
    interface
    • Constructor Detail

      • POJOCommandMediator

        public POJOCommandMediator()
    • Method Detail

      • mediate

        public boolean mediate​(MessageContext synCtx)
        Implements the mediate method of the Mediator interface. This method will instantiate a new instance of the POJO class, set all specified properties from the current runtime state (and message context) and call the execute method of the Command object.
        Parameters:
        synCtx - - Synapse MessageContext to be mediated
        Returns:
        boolean true since this will not stop exection chain
      • getCommand

        public Class getCommand()
      • setCommand

        public void setCommand​(Class command)
      • addStaticSetterProperty

        public void addStaticSetterProperty​(String name,
                                            Object value)
      • addMessageSetterProperty

        public void addMessageSetterProperty​(String name,
                                             SynapseXPath xpath)
      • addContextSetterProperty

        public void addContextSetterProperty​(String name,
                                             String ctxName)
      • addContextGetterProperty

        public void addContextGetterProperty​(String name,
                                             String value)
      • addMessageGetterProperty

        public void addMessageGetterProperty​(String name,
                                             SynapseXPath xpath)
      • getStaticSetterProperties

        public Map<String,​Object> getStaticSetterProperties()
      • getContextSetterProperties

        public Map<String,​String> getContextSetterProperties()
      • getContextGetterProperties

        public Map<String,​String> getContextGetterProperties()