org.apache.synapse.mediators.ext
Class AnnotatedCommandMediator

java.lang.Object
  extended by org.apache.synapse.mediators.AbstractMediator
      extended by org.apache.synapse.mediators.ext.POJOCommandMediator
          extended by org.apache.synapse.mediators.ext.AnnotatedCommandMediator
All Implemented Interfaces:
AspectConfigurable, Mediator, SynapseArtifact

public class AnnotatedCommandMediator
extends POJOCommandMediator


Field Summary
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
AnnotatedCommandMediator()
           
 
Method Summary
protected  SynapseXPath createSynapseXPATH(String xpath, Namespaces nsAnnotation)
          Create an SynapseXPath from an xpath string
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.
protected  void introspectClass(Class<?> commandClass)
          Introspect the command class annotations
 boolean 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, 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
 

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
Constructor Detail

AnnotatedCommandMediator

public AnnotatedCommandMediator()
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 interface Mediator
Overrides:
mediate in class POJOCommandMediator
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 class POJOCommandMediator

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.



Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.