Package com.adaptris.core.runtime
Class StandardMessageErrorDigester
- java.lang.Object
-
- com.adaptris.core.runtime.MessageErrorDigesterImp
-
- com.adaptris.core.runtime.StandardMessageErrorDigester
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageErrorDigester
@ComponentProfile(summary="The default message error digester that exposes some minimum metrics via JMX", tag="error-handling,base") public class StandardMessageErrorDigester extends MessageErrorDigesterImp
Record any error'd adaptris messages and make these available through JMX.In the adapter configuration file this class is aliased as standard-message-error-digester which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description StandardMessageErrorDigester()
StandardMessageErrorDigester(java.lang.String uniqueId)
StandardMessageErrorDigester(java.lang.String uniqueId, int max)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
digest(AdaptrisMessage msg)
Digest the error that failed.MessageErrorDigest
getDigest()
int
getDigestMaxSize()
int
getTotalErrorCount()
Get the total number of errors that were recorded by this Digester implementatino.void
init()
Initialises the component.boolean
remove(MessageDigestErrorEntry entry)
boolean
remove(MessageDigestErrorEntry entry, boolean attemptFileDelete)
boolean
remove(java.lang.String msgId)
boolean
remove(java.lang.String msgId, boolean attemptFileDelete)
void
setDigestMaxSize(int max)
The maximum number of messages you want to hold in this digest.-
Methods inherited from class com.adaptris.core.runtime.MessageErrorDigesterImp
close, getUniqueId, prepare, setUniqueId, start, stop
-
-
-
-
Method Detail
-
init
public void init() throws CoreException
Description copied from interface:ComponentLifecycle
Initialises the component.Component initialisation includes config verification, creation of connections etc.
- Specified by:
init
in interfaceComponentLifecycle
- Overrides:
init
in classMessageErrorDigesterImp
- Throws:
CoreException
- wrapping any underlyingException
s
-
digest
public void digest(AdaptrisMessage msg)
Description copied from interface:MessageErrorDigester
Digest the error that failed.
-
setDigestMaxSize
public void setDigestMaxSize(int max)
The maximum number of messages you want to hold in this digest.
-
getDigestMaxSize
public int getDigestMaxSize()
-
getTotalErrorCount
public int getTotalErrorCount()
Description copied from interface:MessageErrorDigester
Get the total number of errors that were recorded by this Digester implementatino.- Returns:
- the total number of errors.
-
getDigest
public MessageErrorDigest getDigest()
-
remove
public boolean remove(MessageDigestErrorEntry entry)
-
remove
public boolean remove(java.lang.String msgId)
-
remove
public boolean remove(MessageDigestErrorEntry entry, boolean attemptFileDelete)
-
remove
public boolean remove(java.lang.String msgId, boolean attemptFileDelete)
-
-