public abstract class AbstractMediator extends Object implements Mediator, AspectConfigurable
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
log
the standard log for mediators, will assign the logger for the actual subclass
|
protected static org.apache.commons.logging.Log |
trace
The runtime trace log for mediators
|
protected int |
traceState
State of tracing for this mediator
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMediator()
A constructor that makes subclasses pick up the correct logger
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
auditLog(String msg,
MessageContext msgContext)
Deprecated.
This method will be removed in a future version of Synapse.
Please use the
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator. |
protected void |
auditWarn(String msg,
MessageContext msgContext)
Deprecated.
This method will be removed in a future version of Synapse.
Please use the
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator. |
void |
configure(AspectConfiguration aspectConfiguration)
Configure aspects according to the given configuration
|
void |
disableStatistics() |
void |
disableTracing() |
boolean |
divertMediationRoute(MessageContext synCtx)
This method is invoked when mediation happens in debug mode, branches execution to
the Debug Manager, further behavior is governed by the Debug Manager.
|
void |
enableStatistics() |
void |
enableTracing() |
AspectConfiguration |
getAspectConfiguration()
Get the aspects configuration
|
List<String> |
getCommentsList()
Returns Comment List
|
String |
getDescription()
Gives the description of the mediator
|
String |
getInputType() |
protected MediatorFaultHandler |
getLastSequenceFaultHandler(MessageContext synCtx) |
protected SynapseLog |
getLog(MessageContext synCtx)
Get a SynapseLog instance appropriate for the given context.
|
String |
getMediatorName()
Returns the name of the class of respective mediator.
|
int |
getMediatorPosition()
Get the position of the mediator in sequence flow.
|
String |
getOutputType() |
SynapseMediationFlowPoint |
getRegisteredMediationFlowPoint() |
String |
getShortDescription()
Gives the short description of the mediator
|
int |
getTraceState()
Returns the tracing state
|
String |
getType()
Returns the class name of the mediator
|
protected void |
handleException(String msg,
Exception e,
MessageContext msgContext)
Perform an error log message to all logs @ ERROR.
|
protected void |
handleException(String msg,
MessageContext msgContext)
Perform an error log message to all logs @ ERROR.
|
boolean |
isBreakPoint() |
boolean |
isContentAltering()
This is used to indicate whether message payload get modified during mediation
|
boolean |
isContentAware() |
boolean |
isSkipEnabled() |
boolean |
isStatisticsEnable() |
protected boolean |
isTraceOn(MessageContext msgCtx)
Deprecated.
This method will be removed in a future version of Synapse.
Please use the
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator. |
protected boolean |
isTraceOrDebugOn(boolean isTraceOn)
Deprecated.
This method will be removed in a future version of Synapse.
Please use the
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator. |
boolean |
isTracingEnabled() |
void |
registerMediationFlowPoint(SynapseMediationFlowPoint flowPoint) |
void |
reportCloseStatistics(MessageContext messageContext,
Integer currentIndex)
Report Close Statistic Event for the Mediator
|
Integer |
reportOpenStatistics(MessageContext messageContext,
boolean isContentAltering)
Report Open Statistic Event for the Mediator
|
void |
setBreakPoint(boolean isBreakPoint) |
void |
setCommentsList(List<String> commentsList)
Sets comment list for the mediator
|
void |
setComponentStatisticsId(ArtifactHolder holder) |
void |
setDescription(String description)
Set the description of the mediator
|
void |
setEffectiveTraceState(MessageContext synCtx)
This method is used to save previous tracing state and set next the tracing
state for a child mediator
|
void |
setMediatorPosition(int position)
Set the position of the mediator in the sequence
|
void |
setShortDescription(String shortDescription)
Set the short description of the mediator
|
void |
setSkipEnabled(boolean isSkipEnabled) |
void |
setTraceState(int traceState)
Set the tracing state variable
|
protected boolean |
shouldCaptureTracing(MessageContext synCtx) |
boolean |
shouldTrace(int parentTraceState)
Should this mediator perform tracing? True if its explicitly asked to
trace, or its parent has been asked to trace and it does not reject it
|
boolean |
shouldTrace(MessageContext msgCtx) |
protected void |
traceOrDebug(boolean traceOn,
String msg)
Deprecated.
This method will be removed in a future version of Synapse.
Please use the
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator. |
protected void |
traceOrDebugWarn(boolean traceOn,
String msg)
Deprecated.
This method will be removed in a future version of Synapse.
Please use the
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator. |
void |
unregisterMediationFlowPoint() |
protected org.apache.commons.logging.Log log
protected static final org.apache.commons.logging.Log trace
protected int traceState
protected AbstractMediator()
public boolean divertMediationRoute(MessageContext synCtx)
public String getType()
public int getTraceState()
getTraceState in interface Mediatorpublic void setTraceState(int traceState)
setTraceState in interface MediatortraceState - the new tracing state for this mediator (see SynapseConstants)public void setDescription(String description)
setDescription in interface SynapseArtifactdescription - tobe set to the mediatorpublic String getDescription()
getDescription in interface SynapseArtifactpublic void setShortDescription(String shortDescription)
setShortDescription in interface MediatorshortDescription - to be set to the mediatorpublic String getShortDescription()
getShortDescription in interface Mediatorpublic void setEffectiveTraceState(MessageContext synCtx)
synCtx - current messageprotected SynapseLog getLog(MessageContext synCtx)
synCtx - the current message contextpublic boolean shouldTrace(int parentTraceState)
parentTraceState - parents trace statepublic boolean shouldTrace(MessageContext msgCtx)
@Deprecated protected boolean isTraceOn(MessageContext msgCtx)
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator.msgCtx - the current message@Deprecated protected boolean isTraceOrDebugOn(boolean isTraceOn)
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator.isTraceOn - is tracing known to be on?@Deprecated protected void traceOrDebug(boolean traceOn, String msg)
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator.traceOn - is runtime trace on for this message?msg - the message to log/trace@Deprecated protected void traceOrDebugWarn(boolean traceOn, String msg)
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator.traceOn - is runtime trace on for this message?msg - the message to log/trace@Deprecated protected void auditLog(String msg, MessageContext msgContext)
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator.msg - the log messagemsgContext - the message contextprotected void handleException(String msg, MessageContext msgContext)
msg - the log messagemsgContext - the message context@Deprecated protected void auditWarn(String msg, MessageContext msgContext)
SynapseLog instance returned by
getLog(MessageContext) for all logging inside a
mediator.msg - the message to logmsgContext - message contextprotected void handleException(String msg, Exception e, MessageContext msgContext)
msg - the log messagee - an Exception encounteredmsgContext - the message contextpublic boolean isStatisticsEnable()
public void disableStatistics()
public void enableStatistics()
public boolean isTracingEnabled()
public void disableTracing()
public void enableTracing()
public void configure(AspectConfiguration aspectConfiguration)
configure in interface AspectConfigurableaspectConfiguration - AspectConfiguration instancepublic AspectConfiguration getAspectConfiguration()
getAspectConfiguration in interface AspectConfigurablepublic boolean isContentAware()
isContentAware in interface Mediatorpublic boolean isContentAltering()
MediatorisContentAltering in interface Mediatorpublic int getMediatorPosition()
MediatorgetMediatorPosition in interface Mediatorpublic void setMediatorPosition(int position)
MediatorsetMediatorPosition in interface Mediatorposition - positionpublic String getInputType()
public String getOutputType()
public List<String> getCommentsList()
public void setCommentsList(List<String> commentsList)
commentsList - String List of commentspublic String getMediatorName()
getMediatorName in interface Mediatorpublic Integer reportOpenStatistics(MessageContext messageContext, boolean isContentAltering)
MediatorreportOpenStatistics in interface Mediatorpublic void reportCloseStatistics(MessageContext messageContext, Integer currentIndex)
MediatorreportCloseStatistics in interface Mediatorpublic void registerMediationFlowPoint(SynapseMediationFlowPoint flowPoint)
public void unregisterMediationFlowPoint()
public SynapseMediationFlowPoint getRegisteredMediationFlowPoint()
public boolean isBreakPoint()
public boolean isSkipEnabled()
public void setBreakPoint(boolean isBreakPoint)
public void setSkipEnabled(boolean isSkipEnabled)
protected boolean shouldCaptureTracing(MessageContext synCtx)
public void setComponentStatisticsId(ArtifactHolder holder)
setComponentStatisticsId in interface Mediatorprotected MediatorFaultHandler getLastSequenceFaultHandler(MessageContext synCtx)
Copyright © 2005–2019 Apache Software Foundation. All rights reserved.