Class AmazonS3FileSource
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.amazons3.AmazonS3File
com.northconcepts.datapipeline.amazons3.AmazonS3FileSource
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,FileSource,Serializable
A
FileSource that reads an Amazon S3 object through an AmazonS3FileSystem, connecting on demand if
the file system is not open.- See Also:
-
Field Summary
Fields inherited from class com.northconcepts.datapipeline.amazons3.AmazonS3File
amazonS3FileSystem, bucketName, pathFields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).fromXmlElement(Element element) Opens a new stream to read the file's content; the caller must close it.setAmazonS3FileSystem(AmazonS3FileSystem amazonS3FileSystem) setBasicAWSCredentials(String accessKey, String secretKey) Authenticates this file'sAmazonS3FileSystemwith the given access key and secret key, replacing its credentials provider, unless aCredentialsResolveris set, which takes precedence.setBucketName(String bucketName) setCredentialsProvider(AwsCredentialsProvider credentialsProvider) Sets the AWS SDK credentials provider that this file'sAmazonS3FileSystemuses when noCredentialsResolveris set.setCredentialsResolver(CredentialsResolver credentialsResolver) Sets the backend-neutral resolver supplying this file's credentials — resolved on each connection, so rotated secrets are picked up automatically.Sets the key of this file's object within its bucket.toXmlElement(Document document) Returns an element, created withdocument, describing this object; the default implementation throws aDataException.useProfileCredentialsProvider(String profileName) Authenticates this file'sAmazonS3FileSystemusing the named profile from the AWS profile files, unless aCredentialsResolveris set, which takes precedence.Methods inherited from class com.northconcepts.datapipeline.amazons3.AmazonS3File
assertValid, clearFileSize, getAmazonS3FileSystem, getBucketName, getContentType, getCredentialsProvider, getCredentialsResolver, getFileSize, getFileType, getName, getPath, getUrlPath, isDebug, isLocal, refreshFileSize, retainFileSize, setDebug, toRecordMethods inherited from class com.northconcepts.datapipeline.foundations.core.Bean
addExceptionProperties, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionProperties, exception, exception, exceptionMethods inherited from interface com.northconcepts.datapipeline.foundations.file.FileSource
getContentType, getFileSize, getFileType, getName, getPath, getUrlPath, isLocal
-
Constructor Details
-
AmazonS3FileSource
public AmazonS3FileSource()
-
-
Method Details
-
getInputStream
Description copied from interface:FileSourceOpens a new stream to read the file's content; the caller must close it.- Specified by:
getInputStreamin interfaceFileSource
-
setName
- Overrides:
setNamein classAmazonS3File
-
setPath
Description copied from class:AmazonS3FileSets the key of this file's object within its bucket.- Overrides:
setPathin classAmazonS3File
-
setBucketName
- Overrides:
setBucketNamein classAmazonS3File
-
setAmazonS3FileSystem
- Overrides:
setAmazonS3FileSystemin classAmazonS3File
-
setCredentialsProvider
Description copied from class:AmazonS3FileSets the AWS SDK credentials provider that this file'sAmazonS3FileSystemuses when noCredentialsResolveris set.- Overrides:
setCredentialsProviderin classAmazonS3File
-
setCredentialsResolver
Description copied from class:AmazonS3FileSets the backend-neutral resolver supplying this file's credentials — resolved on each connection, so rotated secrets are picked up automatically. Takes precedence overAmazonS3File.setCredentialsProvider(AwsCredentialsProvider)and the default provider chain.- Overrides:
setCredentialsResolverin classAmazonS3File
-
useProfileCredentialsProvider
Description copied from class:AmazonS3FileAuthenticates this file'sAmazonS3FileSystemusing the named profile from the AWS profile files, unless aCredentialsResolveris set, which takes precedence.- Overrides:
useProfileCredentialsProviderin classAmazonS3File
-
setBasicAWSCredentials
Description copied from class:AmazonS3FileAuthenticates this file'sAmazonS3FileSystemwith the given access key and secret key, replacing its credentials provider, unless aCredentialsResolveris set, which takes precedence.- Overrides:
setBasicAWSCredentialsin classAmazonS3File
-
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceFileSource- Specified by:
fromRecordin interfaceRecordSerializable- Overrides:
fromRecordin classAmazonS3File- Parameters:
source-- Returns:
- this instance.
-
toXmlElement
Description copied from interface:XmlSerializableReturns an element, created withdocument, describing this object; the default implementation throws aDataException.- Specified by:
toXmlElementin interfaceXmlSerializable- Overrides:
toXmlElementin classAmazonS3File
-
fromXmlElement
- Specified by:
fromXmlElementin interfaceXmlSerializable- Overrides:
fromXmlElementin classAmazonS3File
-