Class EJBMediator
- java.lang.Object
-
- org.apache.synapse.mediators.AbstractMediator
-
- org.apache.synapse.mediators.bean.enterprise.EJBMediator
-
- All Implemented Interfaces:
AspectConfigurable
,ManagedLifecycle
,Mediator
,SynapseArtifact
public class EJBMediator extends AbstractMediator implements ManagedLifecycle
EJB mediator calls an external Enterprise JavaBean(EJB) and stores the result in the message content or in a message context property. Currently, this mediator supports Stateless Session Beans and Stateful Session Beans.
-
-
Field Summary
-
Fields inherited from class org.apache.synapse.mediators.AbstractMediator
log, trace, traceState
-
-
Constructor Summary
Constructors Constructor Description EJBMediator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addArgument(Value argument)
void
destroy()
This method should implement the destroying of the implemented parts of the configuration.List<Value>
getArgumentList()
Value
getBeanId()
String
getBeanstalkName()
String
getClassName()
String
getJndiName()
Method
getMethod()
Target
getTarget()
void
init(SynapseEnvironment se)
This method should implement the initialization of the implemented parts of the configuration.boolean
isContentAltering()
This is used to indicate whether message payload get modified during mediationboolean
isRemove()
boolean
mediate(MessageContext synCtx)
Calls an external EJB according to the supplied semantics and attaches the result into the message/message context.void
setBeanId(Value beanId)
void
setBeanstalkName(String beanstalkName)
void
setClassName(String className)
void
setJndiName(String jndiName)
void
setMethod(Method method)
void
setRemove(boolean remove)
void
setTarget(Target target)
-
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, 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
-
init
public void init(SynapseEnvironment se)
Description copied from interface:ManagedLifecycle
This method should implement the initialization of the implemented parts of the configuration.- Specified by:
init
in interfaceManagedLifecycle
- Parameters:
se
- SynapseEnvironment to be used for initialization
-
mediate
public boolean mediate(MessageContext synCtx)
Calls an external EJB according to the supplied semantics and attaches the result into the message/message context.
-
destroy
public void destroy()
Description copied from interface:ManagedLifecycle
This method should implement the destroying of the implemented parts of the configuration.- Specified by:
destroy
in interfaceManagedLifecycle
-
getBeanstalkName
public String getBeanstalkName()
-
setBeanstalkName
public void setBeanstalkName(String beanstalkName)
-
getClassName
public String getClassName()
-
setClassName
public void setClassName(String className)
-
getBeanId
public Value getBeanId()
-
setBeanId
public void setBeanId(Value beanId)
-
getMethod
public Method getMethod()
-
setMethod
public void setMethod(Method method)
-
getTarget
public Target getTarget()
-
setTarget
public void setTarget(Target target)
-
getJndiName
public String getJndiName()
-
setJndiName
public void setJndiName(String jndiName)
-
isRemove
public boolean isRemove()
-
setRemove
public void setRemove(boolean remove)
-
addArgument
public void addArgument(Value argument)
-
isContentAltering
public boolean isContentAltering()
Description copied from interface:Mediator
This is used to indicate whether message payload get modified during mediation- Specified by:
isContentAltering
in interfaceMediator
- Overrides:
isContentAltering
in classAbstractMediator
- Returns:
- whether mediator modify the payload
-
-