org.apache.synapse.mediators.ext
Class POJOCommandMediator
java.lang.Object
org.apache.synapse.mediators.AbstractMediator
org.apache.synapse.mediators.ext.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
Method Summary |
void |
addContextGetterProperty(String name,
String value)
|
void |
addContextSetterProperty(String name,
String ctxName)
|
void |
addMessageGetterProperty(String name,
SynapseXPath xpath)
|
void |
addMessageSetterProperty(String name,
SynapseXPath xpath)
|
void |
addStaticSetterProperty(String name,
Object value)
|
Class |
getCommand()
|
Map<String,String> |
getContextGetterProperties()
|
Map<String,String> |
getContextSetterProperties()
|
Map<String,SynapseXPath> |
getMessageGetterProperties()
|
Map<String,SynapseXPath> |
getMessageSetterProperties()
|
Map<String,Object> |
getStaticSetterProperties()
|
boolean |
mediate(MessageContext synCtx)
Implements the mediate method of the Mediator interface. |
void |
setCommand(Class command)
|
Methods inherited from class org.apache.synapse.mediators.AbstractMediator |
auditLog, auditWarn, configure, disableStatistics, enableStatistics, getAspectConfiguration, getDescription, getLog, getTraceState, getType, handleException, handleException, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, setDescription, setEffectiveTraceState, setTraceState, shouldTrace, traceOrDebug, traceOrDebugWarn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
POJOCommandMediator
public POJOCommandMediator()
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()
getMessageSetterProperties
public Map<String,SynapseXPath> getMessageSetterProperties()
getContextSetterProperties
public Map<String,String> getContextSetterProperties()
getContextGetterProperties
public Map<String,String> getContextGetterProperties()
getMessageGetterProperties
public Map<String,SynapseXPath> getMessageGetterProperties()
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.