Search in sources :

Example 1 with QueueRequestOptions

use of com.microsoft.azure.storage.queue.QueueRequestOptions in project camel by apache.

the class QueueServiceUtil method getRequestOptions.

public static QueueServiceRequestOptions getRequestOptions(Exchange exchange) {
    QueueServiceRequestOptions opts = exchange.getIn().getHeader(QueueServiceConstants.QUEUE_SERVICE_REQUEST_OPTIONS, QueueServiceRequestOptions.class);
    if (opts != null) {
        return opts;
    } else {
        opts = new QueueServiceRequestOptions();
    }
    QueueRequestOptions requestOpts = exchange.getIn().getHeader(QueueServiceConstants.QUEUE_REQUEST_OPTIONS, QueueRequestOptions.class);
    OperationContext opContext = exchange.getIn().getHeader(QueueServiceConstants.OPERATION_CONTEXT, OperationContext.class);
    opts.setOpContext(opContext);
    opts.setRequestOpts(requestOpts);
    return opts;
}
Also used : OperationContext(com.microsoft.azure.storage.OperationContext) QueueRequestOptions(com.microsoft.azure.storage.queue.QueueRequestOptions)

Aggregations

OperationContext (com.microsoft.azure.storage.OperationContext)1 QueueRequestOptions (com.microsoft.azure.storage.queue.QueueRequestOptions)1