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 |
enableStatistics() |
AspectConfiguration |
getAspectConfiguration()
Get the aspects configuration
|
String |
getDescription()
Gives the description of the mediator
|
protected SynapseLog |
getLog(MessageContext synCtx)
Get a SynapseLog instance appropriate for the given context.
|
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 |
isContentAware() |
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. |
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 |
setTraceState(int traceState)
Set the tracing state variable
|
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
|
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. |
protected org.apache.commons.logging.Log log
protected static final org.apache.commons.logging.Log trace
protected int traceState
protected AbstractMediator()
public String getType()
public int getTraceState()
getTraceState
in interface Mediator
public void setTraceState(int traceState)
setTraceState
in interface Mediator
traceState
- the new tracing state for this mediator (see SynapseConstants)public void setDescription(String description)
setDescription
in interface SynapseArtifact
description
- tobe set to the mediatorpublic String getDescription()
getDescription
in interface SynapseArtifact
public void setEffectiveTraceState(MessageContext synCtx)
synCtx
- current messageprotected SynapseLog getLog(MessageContext synCtx)
synCtx
- the current message contextpublic boolean shouldTrace(int parentTraceState)
parentTraceState
- parents trace state@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 void configure(AspectConfiguration aspectConfiguration)
configure
in interface AspectConfigurable
aspectConfiguration
- AspectConfiguration instancepublic AspectConfiguration getAspectConfiguration()
getAspectConfiguration
in interface AspectConfigurable
public boolean isContentAware()
isContentAware
in interface Mediator
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.