public interface SessionCallback
Modifier and Type | Method and Description |
---|---|
void |
afterDelivery()
This can be used to complete certain operations outside of the lock,
like acks or other operations.
|
void |
browserFinished(org.apache.activemq.artemis.core.server.ServerConsumer consumer)
Some protocols (Openwire) needs a special message with the browser is finished.
|
default void |
close(boolean failed) |
void |
closed() |
void |
disconnect(org.apache.activemq.artemis.core.server.ServerConsumer consumerId,
SimpleString queueName) |
default org.apache.activemq.artemis.core.transaction.Transaction |
getCurrentTransaction() |
boolean |
hasCredits(org.apache.activemq.artemis.core.server.ServerConsumer consumerID)
This one gives a chance for Proton to have its own flow control.
|
boolean |
isWritable(ReadyListener callback,
Object protocolContext) |
int |
sendLargeMessage(org.apache.activemq.artemis.core.server.MessageReference reference,
Message message,
org.apache.activemq.artemis.core.server.ServerConsumer consumerID,
long bodySize,
int deliveryCount) |
int |
sendLargeMessageContinuation(org.apache.activemq.artemis.core.server.ServerConsumer consumerID,
byte[] body,
boolean continues,
boolean requiresResponse) |
int |
sendMessage(org.apache.activemq.artemis.core.server.MessageReference ref,
Message message,
org.apache.activemq.artemis.core.server.ServerConsumer consumerID,
int deliveryCount) |
void |
sendProducerCreditsFailMessage(int credits,
SimpleString address) |
void |
sendProducerCreditsMessage(int credits,
SimpleString address) |
default boolean |
supportsDirectDelivery()
A requirement to do direct delivery is:
no extra locking required at the protocol layer.
|
boolean |
updateDeliveryCountAfterCancel(org.apache.activemq.artemis.core.server.ServerConsumer consumer,
org.apache.activemq.artemis.core.server.MessageReference ref,
boolean failed)
Use this to updates specifics on the message after a redelivery happened.
|
default boolean supportsDirectDelivery()
boolean hasCredits(org.apache.activemq.artemis.core.server.ServerConsumer consumerID)
void afterDelivery() throws Exception
Exception
boolean updateDeliveryCountAfterCancel(org.apache.activemq.artemis.core.server.ServerConsumer consumer, org.apache.activemq.artemis.core.server.MessageReference ref, boolean failed)
consumer
- ref
- failed
- void sendProducerCreditsMessage(int credits, SimpleString address)
void sendProducerCreditsFailMessage(int credits, SimpleString address)
int sendMessage(org.apache.activemq.artemis.core.server.MessageReference ref, Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumerID, int deliveryCount)
int sendLargeMessage(org.apache.activemq.artemis.core.server.MessageReference reference, Message message, org.apache.activemq.artemis.core.server.ServerConsumer consumerID, long bodySize, int deliveryCount)
int sendLargeMessageContinuation(org.apache.activemq.artemis.core.server.ServerConsumer consumerID, byte[] body, boolean continues, boolean requiresResponse)
void closed()
void disconnect(org.apache.activemq.artemis.core.server.ServerConsumer consumerId, SimpleString queueName)
boolean isWritable(ReadyListener callback, Object protocolContext)
void browserFinished(org.apache.activemq.artemis.core.server.ServerConsumer consumer)
default void close(boolean failed)
default org.apache.activemq.artemis.core.transaction.Transaction getCurrentTransaction()
Copyright © 2020 The Apache Software Foundation. All rights reserved.