Interface RetryStore
-
- All Superinterfaces:
ComponentLifecycle
,ComponentLifecycleExtension
- All Known Implementing Classes:
FilesystemRetryStore
public interface RetryStore extends ComponentLifecycle, ComponentLifecycleExtension
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AdaptrisMessage
buildForRetry(java.lang.String msgId)
Retrieve the message id from the store.default AdaptrisMessage
buildForRetry(java.lang.String msgId, java.util.Map<java.lang.String,java.lang.String> metadata)
Retrieve the message id from the store.AdaptrisMessage
buildForRetry(java.lang.String msgId, java.util.Map<java.lang.String,java.lang.String> metadata, AdaptrisMessageFactory factory)
Build the message for retrying from the store.default boolean
delete(java.lang.String msgId)
Delete a message from the store (optional operation).java.util.Map<java.lang.String,java.lang.String>
getMetadata(java.lang.String msgId)
Retrieve the metadata associated with the msgId the store.default void
prepare()
Prepare for initialisation.default java.lang.Iterable<RemoteBlob>
report()
Report on a list of blobs that is present in the store (optional operation).void
write(AdaptrisMessage msg)
Write a message to the store.-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
-
-
-
Method Detail
-
report
default java.lang.Iterable<RemoteBlob> report() throws InterlokException
Report on a list of blobs that is present in the store (optional operation).- Throws:
InterlokException
- Implementation Note:
- The default implementation just returns an empty list.
-
write
void write(AdaptrisMessage msg) throws InterlokException
Write a message to the store.- Throws:
InterlokException
-
buildForRetry
default AdaptrisMessage buildForRetry(java.lang.String msgId) throws InterlokException
Retrieve the message id from the store.- Throws:
InterlokException
- Implementation Note:
- The default implementation delegates to
buildForRetry(String, Map)
viagetMetadata(String)
-
buildForRetry
default AdaptrisMessage buildForRetry(java.lang.String msgId, java.util.Map<java.lang.String,java.lang.String> metadata) throws InterlokException
Retrieve the message id from the store.- Throws:
InterlokException
- Implementation Note:
- The default implementation delegates to
buildForRetry(String, Map, AdaptrisMessageFactory)
viagetMetadata(String)
-
buildForRetry
AdaptrisMessage buildForRetry(java.lang.String msgId, java.util.Map<java.lang.String,java.lang.String> metadata, AdaptrisMessageFactory factory) throws InterlokException
Build the message for retrying from the store.- Parameters:
msgId
- the message id.metadata
- the metadata you want to apply to the messagefactory
- the message factory to use- Returns:
- a message.
- Throws:
CoreException
InterlokException
-
getMetadata
java.util.Map<java.lang.String,java.lang.String> getMetadata(java.lang.String msgId) throws InterlokException
Retrieve the metadata associated with the msgId the store.This is used to assert that the workflow exists in this instance for that message; there is no point building the whole message only to fail because the workflow doesn't exist.
- Throws:
InterlokException
- if no metadata could be retrieved (e.g the msgId doesn't exist)
-
delete
default boolean delete(java.lang.String msgId) throws InterlokException
Delete a message from the store (optional operation).- Throws:
InterlokException
- Implementation Note:
- The default implementation throws an instance of
UnsupportedOperationException
and performs no other action.
-
prepare
default void prepare() throws CoreException
Description copied from interface:ComponentLifecycleExtension
Prepare for initialisation.- Specified by:
prepare
in interfaceComponentLifecycleExtension
- Throws:
CoreException
-
-