use of org.apache.camel.component.atmos.dto.AtmosResult in project camel by apache.
the class AtmosScheduledPollGetConsumer method poll.
/**
* Poll from an atmos remote path and put the result in the message exchange
* @return number of messages polled
* @throws Exception
*/
@Override
protected int poll() throws Exception {
Exchange exchange = endpoint.createExchange();
AtmosResult result = AtmosAPIFacade.getInstance(configuration.getClient()).get(configuration.getRemotePath());
result.populateExchange(exchange);
try {
// send message to next processor in the route
getProcessor().process(exchange);
// number of messages polled
return 1;
} finally {
// log exception if an exception occurred and was not handled
if (exchange.getException() != null) {
getExceptionHandler().handleException("Error processing exchange", exchange, exchange.getException());
}
}
}
use of org.apache.camel.component.atmos.dto.AtmosResult in project camel by apache.
the class AtmosDelProducer method process.
@Override
public void process(Exchange exchange) throws Exception {
AtmosResult result = AtmosAPIFacade.getInstance(configuration.getClient()).del(configuration.getRemotePath());
result.populateExchange(exchange);
}
use of org.apache.camel.component.atmos.dto.AtmosResult in project camel by apache.
the class AtmosGetProducer method process.
@Override
public void process(Exchange exchange) throws Exception {
AtmosResult result = AtmosAPIFacade.getInstance(configuration.getClient()).get(configuration.getRemotePath());
result.populateExchange(exchange);
}
use of org.apache.camel.component.atmos.dto.AtmosResult in project camel by apache.
the class AtmosPutProducer method process.
@Override
public void process(Exchange exchange) throws Exception {
AtmosResult result = AtmosAPIFacade.getInstance(configuration.getClient()).put(configuration.getLocalPath(), configuration.getRemotePath());
result.populateExchange(exchange);
}
Aggregations