public abstract class MessageProcessor extends FilterContainerImpl
Modifier and Type | Field and Description |
---|---|
protected int |
logMask |
protected java.lang.String |
logMaskType |
Constructor and Description |
---|
MessageProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
filterAttached(ConfigContext ctx,
Entity entity)
Called on a filter's container when the filter is configured.
|
void |
filterDetached() |
java.lang.String |
getCategory()
Get the category of this processor
|
java.lang.String |
getFilterMessage(Message message,
int resultType) |
int |
getLogMask(Message m) |
abstract boolean |
invoke(Circuit c,
Message m)
invoked by circuit to act on a message
|
void |
logFailure(Message m,
java.lang.String circuitName)
Default action for failure logging event
|
void |
logFatal(Message m,
java.lang.String circuitName)
Default action for fatal logging event
|
void |
logMessagePayload(Message m,
java.lang.String circuitName,
com.vordel.log.LogFormatter formatter)
Default action for a payload logging event
|
void |
logSuccess(Message m,
java.lang.String circuitName)
Default action for a successful logging event
|
protected void |
report(java.lang.String msg) |
protected void |
report(java.lang.String msg,
java.lang.Throwable t) |
java.lang.String |
toString() |
configureFilter, createFilterContainer, getFilter, setFilter
public void filterAttached(ConfigContext ctx, Entity entity) throws EntityStoreException
FilterContainerImpl
filterAttached
in class FilterContainerImpl
ctx
- configuration context for the filter attached to this container.entity
- The Entity containing this specific Filter's configuration.EntityStoreException
public void filterDetached()
filterDetached
in class FilterContainerImpl
public abstract boolean invoke(Circuit c, Message m) throws CircuitAbortException
c
- The Circuit contextm
- The messageCircuitAbortException
- If there's an unexpected failure when evaluating the MessageProcessorpublic java.lang.String getCategory()
public void logFatal(Message m, java.lang.String circuitName) throws CircuitAbortException
m
- The Message context.circuitName
- The name of the circuit for which this logging event was invoked.CircuitAbortException
- If there's a problem logging the message.public void logFailure(Message m, java.lang.String circuitName) throws CircuitAbortException
m
- The Message context.circuitName
- The name of the circuit for which this logging event was invoked.CircuitAbortException
- If there's a problem logging the message.public void logSuccess(Message m, java.lang.String circuitName) throws CircuitAbortException
m
- The Message context.circuitName
- The name of the circuit for which this logging event was invoked.CircuitAbortException
- If there's a problem logging the message.public void logMessagePayload(Message m, java.lang.String circuitName, com.vordel.log.LogFormatter formatter) throws java.io.IOException, com.vordel.log.LoggingException
m
- The Message context.circuitName
- The name of the circuit for which this logging event was invoked.formatter
- How to format the logged message.java.io.IOException
- If there's a general problem logging the payload.com.vordel.log.LoggingException
- If there's a Logging-specific problem when logging the payload.public java.lang.String toString()
toString
in class java.lang.Object
protected final void report(java.lang.String msg, java.lang.Throwable t)
protected final void report(java.lang.String msg)
public int getLogMask(Message m)
public java.lang.String getFilterMessage(Message message, int resultType)
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel