public class StaticCacheValueTranslator extends java.lang.Object implements CacheValueTranslator<java.lang.String>, CacheKeyTranslator
CacheValueTranslator
that could be useful for resolving the key when checking or retrieving from a
cache.In the adapter configuration file this class is aliased as static-cache-value-translator which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
StaticCacheValueTranslator() |
StaticCacheValueTranslator(java.lang.String s) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getKeyFromMessage(AdaptrisMessage msg) |
java.lang.String |
getValue() |
java.lang.String |
getValueFromMessage(AdaptrisMessage msg)
Retrieves a value from a message
|
void |
setValue(java.lang.String s)
Sets the static value.
|
StaticCacheValueTranslator |
withValue(java.lang.String s) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addValueToMessage
public StaticCacheValueTranslator()
public StaticCacheValueTranslator(java.lang.String s)
public java.lang.String getValueFromMessage(AdaptrisMessage msg) throws CoreException
CacheValueTranslator
getValueFromMessage
in interface CacheValueTranslator<java.lang.String>
setValue(String)
CoreException
public void setValue(java.lang.String s)
s
- the value, which supports the %message{}
syntax to resolve metadata.public java.lang.String getValue()
public StaticCacheValueTranslator withValue(java.lang.String s)
public java.lang.String getKeyFromMessage(AdaptrisMessage msg) throws CoreException
getKeyFromMessage
in interface CacheKeyTranslator
CoreException