@ComponentProfile(summary="Extract the service to execute from a cache", recommended=CacheConnection.class, since="3.8.4") public class ServiceFromCache extends ExtractorWithConnection
This allows you to retrieve a service (stored as a String) from a configured Cache
instance; it supports the expression syntax so you can build up the key for the cache from
metadata or similar. It will not remove the cache entry.
The alternative to this would be to use RetrieveFromCacheService
and subsequently a
ServiceFromDataInputParameter
(from metadata). How the dynamic services are inserted into
the cache is up to you.
DynamicServiceExecutor
In the adapter configuration file this class is aliased as dynamic-service-from-cache which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
ServiceFromCache() |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getInputStream(AdaptrisMessage msg) |
java.lang.String |
getKey() |
void |
setKey(java.lang.String query) |
ServiceFromCache |
withKey(java.lang.String q) |
close, getConnection, init, setConnection, start, stop, withConnection
getService
public java.io.InputStream getInputStream(AdaptrisMessage msg) throws java.lang.Exception
getInputStream
in class ServiceExtractorImpl
java.lang.Exception
public java.lang.String getKey()
public void setKey(java.lang.String query)
public ServiceFromCache withKey(java.lang.String q)