Class BeanMediator
- java.lang.Object
-
- org.apache.synapse.mediators.AbstractMediator
-
- org.apache.synapse.mediators.bean.BeanMediator
-
- All Implemented Interfaces:
AspectConfigurable,Mediator,SynapseArtifact
public class BeanMediator extends AbstractMediator
Bean mediator can manipulate a JavaBean that is bound to the Synapse message context as a property. This mediator can be used to create a new bean (CREATE action), remove an existing bean (REMOVE action), set a property of an existing JavaBean (SET_PROPERTY action) or to retrieve a property of an existing JavaBean (GET_PROPERTY) action.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBeanMediator.ActionEnum representing the action performed by the Bean mediator.
-
Field Summary
-
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
-
-
Constructor Summary
Constructors Constructor Description BeanMediator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BeanMediator.ActiongetAction()ClassgetClazz()StringgetPropertyName()TargetgetTarget()ValuegetValue()StringgetVarName()booleanisReplace()booleanmediate(MessageContext synCtx)Manipulates a JavaBean attached to the current message context according to the supplied semantics.voidsetAction(BeanMediator.Action action)voidsetClazz(Class clazz)voidsetPropertyName(String propertyName)voidsetReplace(boolean replace)voidsetTarget(Target target)voidsetValue(Value value)voidsetVarName(String varName)-
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
-
-
-
-
Method Detail
-
mediate
public boolean mediate(MessageContext synCtx)
Manipulates a JavaBean attached to the current message context according to the supplied semantics.- Parameters:
synCtx- The current message for mediation- Returns:
- true If mediation should continue
-
getAction
public BeanMediator.Action getAction()
-
setAction
public void setAction(BeanMediator.Action action)
-
getVarName
public String getVarName()
-
setVarName
public void setVarName(String varName)
-
getPropertyName
public String getPropertyName()
-
setPropertyName
public void setPropertyName(String propertyName)
-
getValue
public Value getValue()
-
setValue
public void setValue(Value value)
-
getTarget
public Target getTarget()
-
setTarget
public void setTarget(Target target)
-
isReplace
public boolean isReplace()
-
setReplace
public void setReplace(boolean replace)
-
getClazz
public Class getClazz()
-
setClazz
public void setClazz(Class clazz)
-
-