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

com.azure.messaging.servicebus.implementation.ServiceBusReceiveLink Maven / Gradle / Ivy

There is a newer version: 7.18.0-beta.1
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.messaging.servicebus.implementation;

import com.azure.core.amqp.implementation.AmqpReceiveLink;
import org.apache.qpid.proton.amqp.transport.DeliveryState;
import reactor.core.publisher.Mono;

import java.time.OffsetDateTime;

/**
 * Represents an AMQP receive link.
 */
public interface ServiceBusReceiveLink extends AmqpReceiveLink {
    /**
     * Gets the session id associated with the link.
     *
     * @return The session id associated with the link or an empty mono if this is not a session link.
     */
    Mono getSessionId();

    /**
     * Gets the {@link OffsetDateTime} the session is locked until.
     *
     * @return The {@link OffsetDateTime} the session is locked until or an empty Mono if this is not a session link.
     */
    Mono getSessionLockedUntil();

    /**
     * Updates the disposition status of a message with corresponding lock token.
     *
     * @param lockToken Lock token of message.
     * @param deliveryState Delivery state of message.
     *
     * @return A Mono that completes when the state is successfully updated and acknowledged by message broker.
     */
    Mono updateDisposition(String lockToken, DeliveryState deliveryState);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy