@SpringBootApplication public class GcsSpringIntegrationApplication extends Object
Constructor and Description |
---|
GcsSpringIntegrationApplication() |
Modifier and Type | Method and Description |
---|---|
org.springframework.cloud.gcp.storage.integration.inbound.GcsInboundFileSynchronizer |
gcsInboundFileSynchronizer(com.google.cloud.storage.Storage gcs)
A file synchronizer that knows how to connect to the remote file system (GCS) and scan
it for new files and then download the files.
|
org.springframework.messaging.MessageHandler |
handleNewFileFromSynchronizer()
A service activator that receives messages produced by the
synchronizerAdapter
and simply outputs the file name of each to the console. |
static void |
main(String[] args) |
org.springframework.messaging.MessageHandler |
outboundChannelAdapter(com.google.cloud.storage.Storage gcs)
A service activator that connects to a channel with messages containing
InputStream payloads and copies the file data to a remote directory on GCS. |
org.springframework.integration.core.MessageSource<InputStream> |
streamingAdapter(com.google.cloud.storage.Storage gcs)
An inbound channel adapter that polls the remote directory and produces messages with
InputStream payload that can be used to read the data from remote files. |
org.springframework.integration.core.MessageSource<File> |
synchronizerAdapter(org.springframework.cloud.gcp.storage.integration.inbound.GcsInboundFileSynchronizer synchronizer)
An inbound channel adapter that polls the GCS bucket for new files and copies them to
the local filesystem.
|
public static void main(String[] args)
@Bean public org.springframework.cloud.gcp.storage.integration.inbound.GcsInboundFileSynchronizer gcsInboundFileSynchronizer(com.google.cloud.storage.Storage gcs)
@Bean @InboundChannelAdapter(channel="new-file-channel", poller=) public org.springframework.integration.core.MessageSource<File> synchronizerAdapter(org.springframework.cloud.gcp.storage.integration.inbound.GcsInboundFileSynchronizer synchronizer)
@Bean @ServiceActivator(inputChannel="new-file-channel") public org.springframework.messaging.MessageHandler handleNewFileFromSynchronizer()
synchronizerAdapter
and simply outputs the file name of each to the console.@Bean @InboundChannelAdapter(channel="copy-channel", poller=) public org.springframework.integration.core.MessageSource<InputStream> streamingAdapter(com.google.cloud.storage.Storage gcs)
InputStream
payload that can be used to read the data from remote files.@Bean @ServiceActivator(inputChannel="copy-channel") public org.springframework.messaging.MessageHandler outboundChannelAdapter(com.google.cloud.storage.Storage gcs)
InputStream
payloads and copies the file data to a remote directory on GCS.Copyright © 2019 Pivotal Software, Inc.. All rights reserved.