@ComponentProfile(summary="List contents of an S3 bucket as part of a polling-trigger", since="3.9.2", tag="aws,s3,polling") public class S3BucketList extends ServiceImp implements DynamicPollingTemplate.TemplateProvider, ConnectedService
Under the covers it re-uses S3Service
with a ListOperation
and does a full
lifecycle on the underlying service each time it is triggered. This is intended for use as part
of a DynamicPollingTemplate
; as a result keys are not intended to be resolved using the
%message
expression language; they will, however, be passed as-is into the underlying
service (which may still resolve them).
In the adapter configuration file this class is aliased as s3-bucket-list which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
S3BucketList() |
Modifier and Type | Method and Description |
---|---|
protected void |
closeService() |
void |
doService(AdaptrisMessage msg) |
@NonNull java.lang.String |
getBucket()
The S3 bucket to connect to.
|
AdaptrisConnection |
getConnection() |
RemoteBlobFilter |
getFilter()
Specify any additional filtering you wish to perform on the list.
|
java.lang.String |
getKey()
Deprecated.
|
java.lang.Integer |
getMaxKeys()
Specify max number of keys to be returned.
|
BlobListRenderer |
getOutputStyle() |
java.lang.Boolean |
getPageResults()
Deprecated.
|
java.lang.String |
getPrefix()
The prefix to use when issuing the listOperation
|
protected void |
initService() |
void |
prepare() |
void |
setBucket(@NonNull java.lang.String bucket)
The S3 bucket to connect to.
|
void |
setConnection(AdaptrisConnection connection) |
void |
setFilter(RemoteBlobFilter filter)
Specify any additional filtering you wish to perform on the list.
|
void |
setKey(java.lang.String key)
Deprecated.
|
void |
setMaxKeys(java.lang.Integer maxKeys)
Specify max number of keys to be returned.
|
void |
setOutputStyle(BlobListRenderer outputStyle) |
void |
setPageResults(java.lang.Boolean pageResults)
Deprecated.
|
void |
setPrefix(java.lang.String prefix)
The prefix to use when issuing the listOperation
|
S3BucketList |
withBucket(java.lang.String bucket) |
S3BucketList |
withConnection(AdaptrisConnection c) |
S3BucketList |
withFilter(RemoteBlobFilter f) |
S3BucketList |
withKey(java.lang.String key)
Deprecated.
|
S3BucketList |
withMaxKeys(java.lang.Integer maxKeys) |
S3BucketList |
withOutputStyle(BlobListRenderer outputStyle) |
S3BucketList |
withPrefix(java.lang.String key) |
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
continueOnFailure, isBranching, setUniqueId
createName, createQualifier, isTrackingEndpoint
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
public void prepare() throws CoreException
prepare
in interface ComponentLifecycleExtension
CoreException
protected void initService() throws CoreException
initService
in class ServiceImp
CoreException
protected void closeService()
closeService
in class ServiceImp
public void doService(AdaptrisMessage msg) throws ServiceException
doService
in interface Service
ServiceException
public S3BucketList withConnection(AdaptrisConnection c)
@Deprecated @Removal(version="4.0.0", message="Use prefix instead") public S3BucketList withKey(java.lang.String key)
public S3BucketList withPrefix(java.lang.String key)
public S3BucketList withBucket(java.lang.String bucket)
public S3BucketList withFilter(RemoteBlobFilter f)
public S3BucketList withMaxKeys(java.lang.Integer maxKeys)
public S3BucketList withOutputStyle(BlobListRenderer outputStyle)
public void setConnection(AdaptrisConnection connection)
setConnection
in interface ConnectedService
public AdaptrisConnection getConnection()
getConnection
in interface ConnectedService
public void setOutputStyle(BlobListRenderer outputStyle)
public BlobListRenderer getOutputStyle()
public void setBucket(@NonNull @NonNull java.lang.String bucket)
@NonNull public @NonNull java.lang.String getBucket()
@Deprecated public void setKey(java.lang.String key)
@Deprecated public java.lang.String getKey()
public void setPrefix(java.lang.String prefix)
public java.lang.String getPrefix()
public RemoteBlobFilter getFilter()
public void setFilter(RemoteBlobFilter filter)
@Deprecated public java.lang.Boolean getPageResults()
If set to true will return all results, as oppose to the first n, where n is max-keys (AWS default: 1000). Default is false for backwards compatibility reasons.
@Deprecated public void setPageResults(java.lang.Boolean pageResults)
If set to true will return all results, as oppose to the first n, where n is max-keys (AWS default: 1000). Default is false for backwards compatibility reasons.
public java.lang.Integer getMaxKeys()
public void setMaxKeys(java.lang.Integer maxKeys)