|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.mediators.AbstractMediator
public abstract class AbstractMediator
This is the super class of all mediators, and defines common logging, tracing other aspects for all mediators who extend from this. elements of a mediator class.
| Field Summary | |
|---|---|
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 |
| Constructor Summary | |
|---|---|
protected |
AbstractMediator()
A constructor that makes subclasses pick up the correct logger |
| Method Summary | |
|---|---|
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 |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.synapse.Mediator |
|---|
mediate |
| Field Detail |
|---|
protected org.apache.commons.logging.Log log
protected static final org.apache.commons.logging.Log trace
protected int traceState
| Constructor Detail |
|---|
protected AbstractMediator()
| Method Detail |
|---|
public String getType()
getType in interface Mediatorpublic 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 setEffectiveTraceState(MessageContext synCtx)
synCtx - current messageprotected SynapseLog getLog(MessageContext synCtx)
synCtx - the current message context
public 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 context
protected 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 context
protected 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 AspectConfigurableaspectConfiguration - AspectConfiguration instancepublic AspectConfiguration getAspectConfiguration()
getAspectConfiguration in interface AspectConfigurable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||