Package com.adaptris.aws2.s3
Class S3BucketList
java.lang.Object
com.adaptris.core.ServiceImp
com.adaptris.aws2.s3.S3BucketList
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,ConfigComment,ConnectedService,DynamicPollingTemplate.TemplateProvider,MessageEventGenerator,Service,StateManagedComponent
@ComponentProfile(summary="List contents of an S3 bucket as part of a polling-trigger",
since="4.3.0",
tag="aws2,s3,polling")
public class S3BucketList
extends ServiceImp
implements DynamicPollingTemplate.TemplateProvider, ConnectedService
Query a S3 Location for a list of blobs stored there.
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).
- Since:
- 4.3.0
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.
-
Field Summary
Fields inherited from class com.adaptris.core.ServiceImp
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoiddoService(AdaptrisMessage msg) @NonNull StringThe S3 bucket to connect to.Specify any additional filtering you wish to perform on the list.Specify max number of keys to be returned.The prefix to use when issuing the listOperationprotected voidvoidprepare()voidThe S3 bucket to connect to.voidsetConnection(AdaptrisConnection connection) voidsetFilter(RemoteBlobFilter filter) Specify any additional filtering you wish to perform on the list.voidsetMaxKeys(Integer maxKeys) Specify max number of keys to be returned.voidsetOutputStyle(BlobListRenderer outputStyle) voidThe prefix to use when issuing the listOperationwithBucket(String bucket) withMaxKeys(Integer maxKeys) withOutputStyle(BlobListRenderer outputStyle) withPrefix(String key) Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, enabled, getComments, getContinueOnFail, getEnabled, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setComments, setContinueOnFail, setEnabled, setIsTrackingEndpoint, setUniqueId, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueIdMethods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stopMethods inherited from interface com.adaptris.core.ConfigComment
getComments, setCommentsMethods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpointMethods inherited from interface com.adaptris.core.Service
continueOnFailure, enabled, isBranching, setUniqueIdMethods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
Constructor Details
-
S3BucketList
public S3BucketList()
-
-
Method Details
-
prepare
- Specified by:
preparein interfaceComponentLifecycleExtension- Throws:
CoreException
-
initService
- Specified by:
initServicein classServiceImp- Throws:
CoreException
-
closeService
protected void closeService()- Specified by:
closeServicein classServiceImp
-
doService
- Specified by:
doServicein interfaceService- Throws:
ServiceException
-
withConnection
-
withPrefix
-
withBucket
-
withFilter
-
withMaxKeys
-
withOutputStyle
-
setConnection
- Specified by:
setConnectionin interfaceConnectedService
-
getConnection
- Specified by:
getConnectionin interfaceConnectedService
-
setOutputStyle
-
getOutputStyle
-
setBucket
The S3 bucket to connect to. -
getBucket
The S3 bucket to connect to. -
setPrefix
The prefix to use when issuing the listOperation -
getPrefix
The prefix to use when issuing the listOperation -
getFilter
Specify any additional filtering you wish to perform on the list. -
setFilter
Specify any additional filtering you wish to perform on the list. -
getMaxKeys
Specify max number of keys to be returned. -
setMaxKeys
Specify max number of keys to be returned.
-