@ComponentProfile(summary="Supporting implementation for using S3 as your failed message store", tag="retry,amazon,s3", since="3.11.1", recommended=AmazonS3Connection.class) public class S3RetryStore extends java.lang.Object implements RetryStore
In the adapter configuration file this class is aliased as amazon-s3-retry-store which is the preferred alternative to the fully qualified classname when building your configuration.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
METADATA_FILE_NAME |
protected static java.lang.String |
PAYLOAD_FILE_NAME |
Constructor and Description |
---|
S3RetryStore() |
Modifier and Type | Method and Description |
---|---|
AdaptrisMessage |
buildForRetry(java.lang.String msgId,
java.util.Map<java.lang.String,java.lang.String> metadata,
AdaptrisMessageFactory factory) |
void |
close() |
boolean |
delete(java.lang.String msgId) |
java.lang.String |
getBucket() |
@NonNull AdaptrisConnection |
getConnection()
Set the connection to use to connect to S3.
|
java.io.InputStream |
getInputStream(java.lang.String objectName) |
java.util.Map<java.lang.String,java.lang.String> |
getMetadata(java.lang.String msgId) |
java.lang.String |
getPrefix() |
void |
init() |
void |
prepare() |
java.lang.Iterable<RemoteBlob> |
report() |
void |
setBucket(java.lang.String bucket) |
void |
setConnection(@NonNull AdaptrisConnection connection)
Set the connection to use to connect to S3.
|
void |
setPrefix(java.lang.String prefix) |
void |
start() |
void |
stop() |
S3RetryStore |
withBucket(java.lang.String s) |
S3RetryStore |
withConnection(AdaptrisConnection c) |
S3RetryStore |
withPrefix(java.lang.String s) |
void |
write(AdaptrisMessage msg) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
buildForRetry, buildForRetry
protected static final java.lang.String PAYLOAD_FILE_NAME
protected static final java.lang.String METADATA_FILE_NAME
public void prepare() throws CoreException
prepare
in interface ComponentLifecycleExtension
prepare
in interface RetryStore
CoreException
public void init() throws CoreException
init
in interface ComponentLifecycle
CoreException
public void start() throws CoreException
start
in interface ComponentLifecycle
CoreException
public void stop()
stop
in interface ComponentLifecycle
public void close()
close
in interface ComponentLifecycle
public S3RetryStore withConnection(AdaptrisConnection c)
public S3RetryStore withPrefix(java.lang.String s)
public S3RetryStore withBucket(java.lang.String s)
public java.lang.Iterable<RemoteBlob> report() throws InterlokException
report
in interface RetryStore
InterlokException
public boolean delete(java.lang.String msgId) throws InterlokException
delete
in interface RetryStore
InterlokException
public void write(AdaptrisMessage msg) throws InterlokException
write
in interface RetryStore
InterlokException
public AdaptrisMessage buildForRetry(java.lang.String msgId, java.util.Map<java.lang.String,java.lang.String> metadata, AdaptrisMessageFactory factory) throws InterlokException
buildForRetry
in interface RetryStore
InterlokException
public java.util.Map<java.lang.String,java.lang.String> getMetadata(java.lang.String msgId) throws InterlokException
getMetadata
in interface RetryStore
InterlokException
public java.io.InputStream getInputStream(java.lang.String objectName) throws java.lang.Exception
java.lang.Exception
@NonNull public @NonNull AdaptrisConnection getConnection()
public void setConnection(@NonNull @NonNull AdaptrisConnection connection)
public java.lang.String getBucket()
public void setBucket(java.lang.String bucket)
public java.lang.String getPrefix()
public void setPrefix(java.lang.String prefix)