All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.servicebus.primitives.RequestResponseWorkItem Maven / Gradle / Ivy

The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.microsoft.azure.servicebus.primitives;

import java.time.Duration;
import java.util.concurrent.CompletableFuture;

import com.microsoft.azure.servicebus.TransactionContext;
import org.apache.qpid.proton.message.Message;

public class RequestResponseWorkItem extends WorkItem {
    Message request;
    TransactionContext transaction;

    public RequestResponseWorkItem(Message request, TransactionContext transaction, CompletableFuture completableFuture, TimeoutTracker tracker) {
        super(completableFuture, tracker);
        this.request = request;
        this.transaction = transaction;
    }

    public RequestResponseWorkItem(Message request, TransactionContext transaction, CompletableFuture completableFuture, Duration timeout) {
        super(completableFuture, timeout);
        this.request = request;
        this.transaction = transaction;
    }

    public Message getRequest() {
        return this.request;
    }

    public TransactionContext getTransaction() {
        return this.transaction;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy