CoreMessageReceiver Class

  • java.lang.Object
    • ClientEntity
      • com.microsoft.azure.servicebus.primitives.CoreMessageReceiver

public class CoreMessageReceiver extends ClientEntity

Method Summary

Modifier and Type Method and Description
CompletableFuture<Void> abandonMessageAsync(byte[] deliveryTag, Map<String, Object> propertiesToModify, TransactionContext transaction)
CompletableFuture<Void> abandonMessageAsync(UUID lockToken, Map<String, Object> propertiesToModify, TransactionContext transaction)
CompletableFuture<Void> completeMessageAsync(byte[] deliveryTag, TransactionContext transaction)
CompletableFuture<Void> completeMessageAsync(UUID lockToken, TransactionContext transaction)
CompletableFuture<CoreMessageReceiver> create(final MessagingFactory factory, final String name, final String recvPath, final int prefetchCount, final SettleModePair settleModePair)
CompletableFuture<CoreMessageReceiver> create(final MessagingFactory factory, final String name, final String recvPath, final int prefetchCount, final SettleModePair settleModePair, final MessagingEntityType entityType)
CompletableFuture<CoreMessageReceiver> create(final MessagingFactory factory, final String name, final String recvPath, final String sessionId, final boolean isBrowsableSession, final int prefetchCount, final SettleModePair settleModePair)
CompletableFuture<CoreMessageReceiver> create(final MessagingFactory factory, final String name, final String recvPath, final String sessionId, final boolean isBrowsableSession, final int prefetchCount, final SettleModePair settleModePair, final MessagingEntityType entityType)
CompletableFuture<Void> deadLetterMessageAsync(byte[] deliveryTag, String deadLetterReason, String deadLetterErrorDescription, Map<String, Object> propertiesToModify, TransactionContext transaction)
CompletableFuture<Void> deadLetterMessageAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String, Object> propertiesToModify, TransactionContext transaction)
CompletableFuture<Void> deferMessageAsync(byte[] deliveryTag, Map<String, Object> propertiesToModify, TransactionContext transaction)
CompletableFuture<Void> deferMessageAsync(UUID lockToken, Map<String, Object> propertiesToModify, TransactionContext transaction)
ErrorContext getContext()
int getPrefetchCount()
String getSessionId()
Instant getSessionLockedUntilUtc()
CompletableFuture<byte[]> getSessionStateAsync()
CompletableFuture<Void> onClose()
void onClose(ErrorCondition condition)
void onError(Exception exception)
void onOpenComplete(Exception exception)
void onReceiveComplete(Delivery delivery)
CompletableFuture<Collection<Message>> peekMessagesAsync(long fromSequenceNumber, int messageCount, String sessionId)
CompletableFuture<Collection<MessageWithDeliveryTag>> receiveAsync(final int maxMessageCount, Duration timeout)
CompletableFuture<Collection<MessageWithLockToken>> receiveDeferredMessageBatchAsync(Long[] sequenceNumbers)
CompletableFuture<Collection<Instant>> renewMessageLocksAsync(UUID[] lockTokens)
CompletableFuture<Void> renewSessionLocksAsync()
void setPrefetchCount(final int value)
CompletableFuture<Void> setSessionStateAsync(byte[] sessionState)
CompletableFuture<Void> updateDispositionAsync(UUID[] lockTokens, String dispositionStatus, String deadLetterReason, String deadLetterErrorDescription, Map<String, Object> propertiesToModify, TransactionContext transaction)

Inherited Members

Method Details

abandonMessageAsync

public CompletableFuture abandonMessageAsync(byte[] deliveryTag, Map propertiesToModify, TransactionContext transaction)

Parameters:

deliveryTag
propertiesToModify
transaction

abandonMessageAsync

public CompletableFuture abandonMessageAsync(UUID lockToken, Map propertiesToModify, TransactionContext transaction)

Parameters:

lockToken
propertiesToModify
transaction

completeMessageAsync

public CompletableFuture completeMessageAsync(byte[] deliveryTag, TransactionContext transaction)

Parameters:

deliveryTag
transaction

completeMessageAsync

public CompletableFuture completeMessageAsync(UUID lockToken, TransactionContext transaction)

Parameters:

lockToken
transaction

create

public static CompletableFuture create(final MessagingFactory factory, final String name, final String recvPath, final int prefetchCount, final SettleModePair settleModePair)

Parameters:

factory
name
recvPath
prefetchCount
settleModePair

create

public static CompletableFuture create(final MessagingFactory factory, final String name, final String recvPath, final int prefetchCount, final SettleModePair settleModePair, final MessagingEntityType entityType)

Parameters:

factory
name
recvPath
prefetchCount
settleModePair
entityType

create

public static CompletableFuture create(final MessagingFactory factory, final String name, final String recvPath, final String sessionId, final boolean isBrowsableSession, final int prefetchCount, final SettleModePair settleModePair)

Parameters:

factory
name
recvPath
sessionId
isBrowsableSession
prefetchCount
settleModePair

create

public static CompletableFuture create(final MessagingFactory factory, final String name, final String recvPath, final String sessionId, final boolean isBrowsableSession, final int prefetchCount, final SettleModePair settleModePair, final MessagingEntityType entityType)

Parameters:

factory
name
recvPath
sessionId
isBrowsableSession
prefetchCount
settleModePair
entityType

deadLetterMessageAsync

public CompletableFuture deadLetterMessageAsync(byte[] deliveryTag, String deadLetterReason, String deadLetterErrorDescription, Map propertiesToModify, TransactionContext transaction)

Parameters:

deliveryTag
deadLetterReason
deadLetterErrorDescription
propertiesToModify
transaction

deadLetterMessageAsync

public CompletableFuture deadLetterMessageAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map propertiesToModify, TransactionContext transaction)

Parameters:

lockToken
deadLetterReason
deadLetterErrorDescription
propertiesToModify
transaction

deferMessageAsync

public CompletableFuture deferMessageAsync(byte[] deliveryTag, Map propertiesToModify, TransactionContext transaction)

Parameters:

deliveryTag
propertiesToModify
transaction

deferMessageAsync

public CompletableFuture deferMessageAsync(UUID lockToken, Map propertiesToModify, TransactionContext transaction)

Parameters:

lockToken
propertiesToModify
transaction

getContext

public ErrorContext getContext()

getPrefetchCount

public int getPrefetchCount()

getSessionId

public String getSessionId()

getSessionLockedUntilUtc

public Instant getSessionLockedUntilUtc()

getSessionStateAsync

public CompletableFuture getSessionStateAsync()

onClose

protected CompletableFuture onClose()

onClose

public void onClose(ErrorCondition condition)

Parameters:

condition

onError

public void onError(Exception exception)

Parameters:

exception

onOpenComplete

public void onOpenComplete(Exception exception)

Parameters:

exception

onReceiveComplete

public void onReceiveComplete(Delivery delivery)

Parameters:

delivery

peekMessagesAsync

public CompletableFuture> peekMessagesAsync(long fromSequenceNumber, int messageCount, String sessionId)

Parameters:

fromSequenceNumber
messageCount
sessionId

receiveAsync

public CompletableFuture> receiveAsync(final int maxMessageCount, Duration timeout)

Parameters:

maxMessageCount
timeout

receiveDeferredMessageBatchAsync

public CompletableFuture> receiveDeferredMessageBatchAsync(Long[] sequenceNumbers)

Parameters:

sequenceNumbers

renewMessageLocksAsync

public CompletableFuture> renewMessageLocksAsync(UUID[] lockTokens)

Parameters:

lockTokens

renewSessionLocksAsync

public CompletableFuture renewSessionLocksAsync()

setPrefetchCount

public void setPrefetchCount(final int value)

Parameters:

value

setSessionStateAsync

public CompletableFuture setSessionStateAsync(byte[] sessionState)

Parameters:

sessionState

updateDispositionAsync

public CompletableFuture updateDispositionAsync(UUID[] lockTokens, String dispositionStatus, String deadLetterReason, String deadLetterErrorDescription, Map propertiesToModify, TransactionContext transaction)

Parameters:

lockTokens
dispositionStatus
deadLetterReason
deadLetterErrorDescription
propertiesToModify
transaction

Applies to