public class AmazonS3InboundSynchronizationMessageSource extends org.springframework.integration.context.IntegrationObjectSupport implements org.springframework.integration.core.MessageSource<java.io.File>, FileEventHandler
| Constructor and Description |
|---|
AmazonS3InboundSynchronizationMessageSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
onEvent(FileEvent event)
The Method that would be invoked with the specified event that occurred on the file
|
protected void |
onInit() |
org.springframework.integration.Message<java.io.File> |
receive() |
void |
setAcceptSubFolders(boolean acceptSubFolders)
Set to true if you want the subfolders of the given remote folder to be synchronized to the
local directory.
|
void |
setAwsEndpoint(java.lang.String awsEndpoint)
The AWS region's endpoint whose bucket(and the subfolder if any) will be synchronized
by this adapter
|
void |
setBucket(java.lang.String bucket)
Sets the bucket with which the data in local directory is synchronized with.
|
void |
setCredentials(AWSCredentials credentials)
Sets the AWSCredential instance to be used
|
void |
setDirectory(org.springframework.expression.Expression directoryExpression)
Sets the expression to find the local directory where the remote files are synchronized with.
|
void |
setFileNameRegex(java.lang.String fileNameRegex)
Sets the regex to be used to match the objects in S3 bucket.
|
void |
setFileNameWildcard(java.lang.String fileNameWildcard)
Sets the file's wildcard pattern that would be used to match the objects in S3 bucket
This attribute is mutually exclusive to fileName regex.
|
void |
setMaxObjectsPerBatch(int maxObjectsPerBatch)
The maximum number of objects those will be retrieved in one batch from Amazon S3 bucket
as part of the listOperation
|
void |
setRemoteDirectory(java.lang.String remoteDirectory)
Sets the remote directory, this is the directory relative to the provided bucket
in S3.
|
void |
setS3Operations(AmazonS3Operations s3Operations)
Sets the
AmazonS3Operations instance that would be used for the receiving
the objects and listing the objects in the bucket. |
void |
setTemporarySuffix(java.lang.String temporarySuffix)
The temporary suffix that would be used to indicate that the file is being writtem and the operation
is not yet complete
|
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toStringpublic AmazonS3InboundSynchronizationMessageSource()
public org.springframework.integration.Message<java.io.File> receive()
receive in interface org.springframework.integration.core.MessageSource<java.io.File>protected void onInit()
throws java.lang.Exception
onInit in class org.springframework.integration.context.IntegrationObjectSupportjava.lang.Exceptionpublic void setCredentials(AWSCredentials credentials)
public void setTemporarySuffix(java.lang.String temporarySuffix)
temporarySuffix - public void setMaxObjectsPerBatch(int maxObjectsPerBatch)
maxObjectsPerBatch - public void setFileNameWildcard(java.lang.String fileNameWildcard)
fileNameWildcard - Must not be empty.public void setFileNameRegex(java.lang.String fileNameRegex)
fileNameRegex - public void setBucket(java.lang.String bucket)
bucket - public void setRemoteDirectory(java.lang.String remoteDirectory)
remoteDirectory - public void setDirectory(org.springframework.expression.Expression directoryExpression)
directoryExpression - Must not be nullpublic void setS3Operations(AmazonS3Operations s3Operations)
AmazonS3Operations instance that would be used for the receiving
the objects and listing the objects in the bucket.s3Operations - public void setAcceptSubFolders(boolean acceptSubFolders)
acceptSubFolders - public void setAwsEndpoint(java.lang.String awsEndpoint)
awsEndpoint - public void onEvent(FileEvent event)
FileEventHandleronEvent in interface FileEventHandlerevent - the FileEvent