public class CacheEntryEvaluator
extends java.lang.Object
In the adapter configuration file this class is aliased as cache-entry-evaluator which is the preferred alternative to the fully qualified classname when building your configuration.
Modifier and Type | Class and Description |
---|---|
static class |
CacheEntryEvaluator.NullCacheValueTranslator |
Constructor and Description |
---|
CacheEntryEvaluator() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
friendlyName() |
java.lang.Boolean |
getErrorOnEmptyKey() |
java.lang.Boolean |
getErrorOnEmptyValue() |
java.lang.String |
getFriendlyName() |
protected java.lang.String |
getKey(AdaptrisMessage msg) |
CacheKeyTranslator |
getKeyTranslator()
Get the configured key translator.
|
protected java.lang.Object |
getValue(AdaptrisMessage msg) |
CacheValueTranslator |
getValueTranslator()
Get the configured value translator.
|
CacheKeyTranslator |
keyTranslator()
Get the key translator.
|
void |
setErrorOnEmptyKey(java.lang.Boolean bool)
Throw an error if we cannot look up the Key value
|
void |
setErrorOnEmptyValue(java.lang.Boolean bool)
Throw an error if we cannot look up the Value to be stored in the cache
|
void |
setFriendlyName(java.lang.String name)
Set the name of this cache entry generator for logging purposes.
|
void |
setKeyTranslator(CacheKeyTranslator translator)
Sets the translator to use to extract the Key value from the message
|
void |
setValueTranslator(CacheValueTranslator translator)
Sets the translator to extract the Value to be stored in the cache
|
CacheValueTranslator |
valueTranslator()
Get the value translator.
|
protected java.lang.String getKey(AdaptrisMessage msg) throws ServiceException
ServiceException
protected java.lang.Object getValue(AdaptrisMessage msg) throws ServiceException
ServiceException
public void setErrorOnEmptyKey(java.lang.Boolean bool)
bool
- default is true.public java.lang.Boolean getErrorOnEmptyKey()
public void setErrorOnEmptyValue(java.lang.Boolean bool)
bool
- default is true.public java.lang.Boolean getErrorOnEmptyValue()
public void setKeyTranslator(CacheKeyTranslator translator)
translator
- default is null.public CacheKeyTranslator getKeyTranslator()
public CacheKeyTranslator keyTranslator()
setKeyTranslator(CacheKeyTranslator)
or a default translator if null.public void setValueTranslator(CacheValueTranslator translator)
translator
- default is null.public CacheValueTranslator getValueTranslator()
public CacheValueTranslator valueTranslator()
setValueTranslator(CacheValueTranslator)
or a default translator if null.public java.lang.String getFriendlyName()
public void setFriendlyName(java.lang.String name)
name
- public java.lang.String friendlyName()