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 class
BeanMediator.Action
Enum 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.Action
getAction()
Class
getClazz()
String
getPropertyName()
Target
getTarget()
Value
getValue()
String
getVarName()
boolean
isReplace()
boolean
mediate(MessageContext synCtx)
Manipulates a JavaBean attached to the current message context according to the supplied semantics.void
setAction(BeanMediator.Action action)
void
setClazz(Class clazz)
void
setPropertyName(String propertyName)
void
setReplace(boolean replace)
void
setTarget(Target target)
void
setValue(Value value)
void
setVarName(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)
-
-