org.apache.camel.component.file.GenericFile Java Examples
The following examples show how to use
org.apache.camel.component.file.GenericFile.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CamelFileMessageConsumer.java From smallrye-reactive-messaging with Apache License 2.0 | 5 votes |
@Incoming("files") public CompletionStage<Void> consume(Message<GenericFile<File>> msg) { File file = msg.getPayload().getFile(); // process the file return msg.ack(); }
Example #2
Source File: IncomingCamelMetadataExample.java From smallrye-reactive-messaging with Apache License 2.0 | 5 votes |
@Incoming("files") public CompletionStage<Void> consume(Message<GenericFile<File>> msg) { Optional<IncomingExchangeMetadata> metadata = msg.getMetadata(IncomingExchangeMetadata.class); if (metadata.isPresent()) { // Retrieve the camel exchange: Exchange exchange = metadata.get().getExchange(); } return msg.ack(); }
Example #3
Source File: CamelFileConsumer.java From smallrye-reactive-messaging with Apache License 2.0 | 4 votes |
@Incoming("files") public void consume(GenericFile<File> gf) { File file = gf.getFile(); // process the file }
Example #4
Source File: FileMessageConsumer.java From smallrye-reactive-messaging with Apache License 2.0 | 4 votes |
@Incoming("files") public CompletionStage<Void> consume(Message<GenericFile<File>> msg) { File actualFile = msg.getPayload().getFile(); list.add(actualFile.getName()); return msg.ack(); }
Example #5
Source File: FileConsumer.java From smallrye-reactive-messaging with Apache License 2.0 | 4 votes |
@Incoming("files") public void consume(GenericFile<File> file) { File actualFile = file.getFile(); list.add(actualFile.getName()); }