Package org.apache.synapse.mediators.ext
Class AnnotatedCommandMediator
- java.lang.Object
-
- org.apache.synapse.mediators.AbstractMediator
-
- org.apache.synapse.mediators.ext.POJOCommandMediator
-
- org.apache.synapse.mediators.ext.AnnotatedCommandMediator
-
- All Implemented Interfaces:
AspectConfigurable
,Mediator
,SynapseArtifact
public class AnnotatedCommandMediator extends POJOCommandMediator
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Field,SynapseXPath>
afterFields
protected Map<Method,SynapseXPath>
afterMethods
protected Map<Field,SynapseXPath>
beforeFields
protected Map<Method,SynapseXPath>
beforeMethods
-
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
-
-
Constructor Summary
Constructors Constructor Description AnnotatedCommandMediator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SynapseXPath
createSynapseXPATH(String xpath, Namespaces nsAnnotation)
Create an SynapseXPath from an xpath stringprotected Map<String,String>
getNamespaces(Namespaces namespaces)
Creates a Map of namespace prefixes and namespaces from a Namespace annotation and the default Namespace annotation on the command class.protected void
introspectClass(Class<?> commandClass)
Introspect the command class annotationsboolean
mediate(MessageContext synCtx)
Implements the mediate method of the Mediator interface.void
setCommand(Class commandClass)
-
Methods inherited from class org.apache.synapse.mediators.ext.POJOCommandMediator
addContextGetterProperty, addContextSetterProperty, addMessageGetterProperty, addMessageSetterProperty, addStaticSetterProperty, getCommand, getContextGetterProperties, getContextSetterProperties, getMessageGetterProperties, getMessageSetterProperties, getStaticSetterProperties
-
Methods inherited from class org.apache.synapse.mediators.AbstractMediator
auditLog, auditWarn, configure, disableStatistics, disableTracing, divertMediationRoute, enableStatistics, enableTracing, getAspectConfiguration, getCommentsList, getDescription, getInputType, getLastSequenceFaultHandler, getLog, getMediatorName, getMediatorPosition, getOutputType, getRegisteredMediationFlowPoint, getShortDescription, getTraceState, getType, handleException, handleException, isBreakPoint, isContentAltering, isContentAware, isSkipEnabled, isStatisticsEnable, isTraceOn, isTraceOrDebugOn, isTracingEnabled, registerMediationFlowPoint, reportCloseStatistics, reportOpenStatistics, setBreakPoint, setCommentsList, setComponentStatisticsId, setDescription, setEffectiveTraceState, setMediatorPosition, setShortDescription, setSkipEnabled, setTraceState, shouldCaptureTracing, shouldTrace, shouldTrace, traceOrDebug, traceOrDebugWarn, unregisterMediationFlowPoint
-
-
-
-
Field Detail
-
beforeFields
protected Map<Field,SynapseXPath> beforeFields
-
beforeMethods
protected Map<Method,SynapseXPath> beforeMethods
-
afterFields
protected Map<Field,SynapseXPath> afterFields
-
afterMethods
protected Map<Method,SynapseXPath> afterMethods
-
-
Method Detail
-
mediate
public boolean mediate(MessageContext synCtx)
Description copied from class:POJOCommandMediator
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.- Specified by:
mediate
in interfaceMediator
- Overrides:
mediate
in classPOJOCommandMediator
- Parameters:
synCtx
- - Synapse MessageContext to be mediated- Returns:
- boolean true since this will not stop exection chain
-
setCommand
public void setCommand(Class commandClass)
- Overrides:
setCommand
in classPOJOCommandMediator
-
introspectClass
protected void introspectClass(Class<?> commandClass)
Introspect the command class annotations
-
createSynapseXPATH
protected SynapseXPath createSynapseXPATH(String xpath, Namespaces nsAnnotation)
Create an SynapseXPath from an xpath string
-
getNamespaces
protected Map<String,String> getNamespaces(Namespaces namespaces)
Creates a Map of namespace prefixes and namespaces from a Namespace annotation and the default Namespace annotation on the command class.
-
-