Package com.adaptris.aws.s3.retry
Class S3RetryStore
- java.lang.Object
-
- com.adaptris.aws.s3.retry.S3RetryStore
-
- All Implemented Interfaces:
ComponentLifecycle
,ComponentLifecycleExtension
,RetryStore
@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.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
METADATA_FILE_NAME
protected static java.lang.String
PAYLOAD_FILE_NAME
protected static java.lang.String
STACKTRACE_FILENAME
-
Constructor Summary
Constructors Constructor Description S3RetryStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.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)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.http.jetty.retry.RetryStore
buildForRetry, buildForRetry
-
-
-
-
Field Detail
-
PAYLOAD_FILE_NAME
protected static final java.lang.String PAYLOAD_FILE_NAME
- See Also:
- Constant Field Values
-
METADATA_FILE_NAME
protected static final java.lang.String METADATA_FILE_NAME
- See Also:
- Constant Field Values
-
STACKTRACE_FILENAME
protected static final java.lang.String STACKTRACE_FILENAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
prepare
public void prepare() throws CoreException
- Specified by:
prepare
in interfaceComponentLifecycleExtension
- Specified by:
prepare
in interfaceRetryStore
- Throws:
CoreException
-
init
public void init() throws CoreException
- Specified by:
init
in interfaceComponentLifecycle
- Throws:
CoreException
-
start
public void start() throws CoreException
- Specified by:
start
in interfaceComponentLifecycle
- Throws:
CoreException
-
stop
public void stop()
- Specified by:
stop
in interfaceComponentLifecycle
-
close
public void close()
- Specified by:
close
in interfaceComponentLifecycle
-
withConnection
public S3RetryStore withConnection(AdaptrisConnection c)
-
withPrefix
public S3RetryStore withPrefix(java.lang.String s)
-
withBucket
public S3RetryStore withBucket(java.lang.String s)
-
report
public java.lang.Iterable<RemoteBlob> report() throws InterlokException
- Specified by:
report
in interfaceRetryStore
- Throws:
InterlokException
-
delete
public boolean delete(java.lang.String msgId) throws InterlokException
- Specified by:
delete
in interfaceRetryStore
- Throws:
InterlokException
-
write
public void write(AdaptrisMessage msg) throws InterlokException
- Specified by:
write
in interfaceRetryStore
- Throws:
InterlokException
-
buildForRetry
public AdaptrisMessage buildForRetry(java.lang.String msgId, java.util.Map<java.lang.String,java.lang.String> metadata, AdaptrisMessageFactory factory) throws InterlokException
- Specified by:
buildForRetry
in interfaceRetryStore
- Throws:
InterlokException
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> getMetadata(java.lang.String msgId) throws InterlokException
- Specified by:
getMetadata
in interfaceRetryStore
- Throws:
InterlokException
-
getConnection
@NonNull public @NonNull AdaptrisConnection getConnection()
Set the connection to use to connect to S3.
-
setConnection
public void setConnection(@NonNull @NonNull AdaptrisConnection connection)
Set the connection to use to connect to S3.
-
getBucket
public java.lang.String getBucket()
-
setBucket
public void setBucket(java.lang.String bucket)
-
getPrefix
public java.lang.String getPrefix()
-
setPrefix
public void setPrefix(java.lang.String prefix)
-
-