public class ProtonSessionIntegrationCallback extends Object implements AMQPSessionCallback, SessionCallback
| Modifier and Type | Field and Description |
|---|---|
protected IDGenerator |
consumerIDGenerator |
| Constructor and Description |
|---|
ProtonSessionIntegrationCallback(ActiveMQProtonConnectionCallback protonSPI,
ProtonProtocolManager manager,
AMQPConnectionContext connection,
Connection transportConnection,
Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
ack(Object brokerConsumer,
Object message) |
void |
afterDelivery()
This can be used to complete certain operations outside of the lock,
like acks or other operations.
|
boolean |
bindingQuery(String address) |
void |
browserFinished(ServerConsumer consumer)
Some protocols (Openwire) needs a special message with the browser is finished.
|
void |
cancel(Object brokerConsumer,
Object message,
boolean updateCounts) |
void |
close() |
void |
closed() |
void |
closeSender(Object brokerConsumer) |
void |
commitCurrentTX() |
void |
createDurableQueue(String address,
String queueName) |
Object |
createSender(ProtonPlugSender protonSender,
String queue,
String filter,
boolean browserOnly) |
void |
createTemporaryQueue(String queueName) |
void |
createTemporaryQueue(String address,
String queueName) |
void |
deleteQueue(String address) |
void |
disconnect(ServerConsumer consumer,
String queueName) |
org.apache.qpid.proton.message.ProtonJMessage |
encodeMessage(Object message,
int deliveryCount) |
org.apache.qpid.proton.amqp.Binary |
getCurrentTXID() |
String |
getPubSubPrefix() |
boolean |
hasCredits(ServerConsumer consumer)
This one gives a chance for Proton to have its own flow control.
|
void |
init(AMQPSessionContext protonSession,
SASLResult saslResult) |
boolean |
isWritable(ReadyListener callback) |
void |
offerProducerCredit(String address,
int credits,
int threshold,
org.apache.qpid.proton.engine.Receiver receiver) |
void |
onFlowConsumer(Object consumer,
int credits,
boolean drain) |
boolean |
queueQuery(String queueName) |
void |
resumeDelivery(Object consumer) |
void |
rollbackCurrentTX(boolean lastMessageDelivered) |
int |
sendLargeMessage(MessageReference ref,
ServerMessage message,
ServerConsumer consumer,
long bodySize,
int deliveryCount) |
int |
sendLargeMessageContinuation(ServerConsumer consumer,
byte[] body,
boolean continues,
boolean requiresResponse) |
int |
sendMessage(MessageReference ref,
ServerMessage message,
ServerConsumer consumer,
int deliveryCount) |
void |
sendProducerCreditsFailMessage(int credits,
SimpleString address) |
void |
sendProducerCreditsMessage(int credits,
SimpleString address) |
void |
serverSend(org.apache.qpid.proton.engine.Receiver receiver,
org.apache.qpid.proton.engine.Delivery delivery,
String address,
int messageFormat,
io.netty.buffer.ByteBuf messageEncoded) |
void |
start() |
void |
startSender(Object brokerConsumer) |
String |
tempQueueName() |
boolean |
updateDeliveryCountAfterCancel(ServerConsumer consumer,
MessageReference ref,
boolean failed)
Use this to updates specifics on the message after a redelivery happened.
|
protected final IDGenerator consumerIDGenerator
public ProtonSessionIntegrationCallback(ActiveMQProtonConnectionCallback protonSPI, ProtonProtocolManager manager, AMQPConnectionContext connection, Connection transportConnection, Executor executor)
public boolean isWritable(ReadyListener callback)
isWritable in interface SessionCallbackpublic void onFlowConsumer(Object consumer, int credits, boolean drain)
onFlowConsumer in interface AMQPSessionCallbackpublic void browserFinished(ServerConsumer consumer)
SessionCallbackbrowserFinished in interface SessionCallbackpublic void init(AMQPSessionContext protonSession, SASLResult saslResult) throws Exception
init in interface AMQPSessionCallbackExceptionpublic void afterDelivery()
throws Exception
SessionCallbackafterDelivery in interface SessionCallbackExceptionpublic void start()
start in interface AMQPSessionCallbackpublic Object createSender(ProtonPlugSender protonSender, String queue, String filter, boolean browserOnly) throws Exception
createSender in interface AMQPSessionCallbackExceptionpublic void startSender(Object brokerConsumer) throws Exception
startSender in interface AMQPSessionCallbackExceptionpublic void createTemporaryQueue(String queueName) throws Exception
createTemporaryQueue in interface AMQPSessionCallbackExceptionpublic void createTemporaryQueue(String address, String queueName) throws Exception
createTemporaryQueue in interface AMQPSessionCallbackExceptionpublic void createDurableQueue(String address, String queueName) throws Exception
createDurableQueue in interface AMQPSessionCallbackExceptionpublic boolean queueQuery(String queueName) throws Exception
queueQuery in interface AMQPSessionCallbackExceptionpublic boolean bindingQuery(String address) throws Exception
bindingQuery in interface AMQPSessionCallbackExceptionpublic void closeSender(Object brokerConsumer) throws Exception
closeSender in interface AMQPSessionCallbackExceptionpublic org.apache.qpid.proton.message.ProtonJMessage encodeMessage(Object message, int deliveryCount) throws Exception
encodeMessage in interface AMQPSessionCallbackExceptionpublic org.apache.qpid.proton.amqp.Binary getCurrentTXID()
getCurrentTXID in interface AMQPSessionCallbackpublic String tempQueueName()
tempQueueName in interface AMQPSessionCallbackpublic void commitCurrentTX()
throws Exception
commitCurrentTX in interface AMQPSessionCallbackExceptionpublic void rollbackCurrentTX(boolean lastMessageDelivered)
throws Exception
rollbackCurrentTX in interface AMQPSessionCallbackExceptionpublic void close()
throws Exception
close in interface AMQPSessionCallbackExceptionpublic void ack(Object brokerConsumer, Object message) throws Exception
ack in interface AMQPSessionCallbackExceptionpublic void cancel(Object brokerConsumer, Object message, boolean updateCounts) throws Exception
cancel in interface AMQPSessionCallbackupdateCounts - this identified if the cancel was because of a failure or just cleaning up the
client's cache.
in some implementations you could call this failedExceptionpublic void resumeDelivery(Object consumer)
resumeDelivery in interface AMQPSessionCallbackpublic void serverSend(org.apache.qpid.proton.engine.Receiver receiver,
org.apache.qpid.proton.engine.Delivery delivery,
String address,
int messageFormat,
io.netty.buffer.ByteBuf messageEncoded)
throws Exception
serverSend in interface AMQPSessionCallbackmessageEncoded - a Heap Buffer ByteBuffer (safe to convert into byte[])Exceptionpublic String getPubSubPrefix()
getPubSubPrefix in interface AMQPSessionCallbackpublic void offerProducerCredit(String address, int credits, int threshold, org.apache.qpid.proton.engine.Receiver receiver)
offerProducerCredit in interface AMQPSessionCallbackpublic void deleteQueue(String address) throws Exception
deleteQueue in interface AMQPSessionCallbackExceptionpublic void sendProducerCreditsMessage(int credits,
SimpleString address)
sendProducerCreditsMessage in interface SessionCallbackpublic boolean updateDeliveryCountAfterCancel(ServerConsumer consumer, MessageReference ref, boolean failed)
SessionCallbackupdateDeliveryCountAfterCancel in interface SessionCallbackpublic void sendProducerCreditsFailMessage(int credits,
SimpleString address)
sendProducerCreditsFailMessage in interface SessionCallbackpublic int sendMessage(MessageReference ref, ServerMessage message, ServerConsumer consumer, int deliveryCount)
sendMessage in interface SessionCallbackpublic int sendLargeMessage(MessageReference ref, ServerMessage message, ServerConsumer consumer, long bodySize, int deliveryCount)
sendLargeMessage in interface SessionCallbackpublic int sendLargeMessageContinuation(ServerConsumer consumer, byte[] body, boolean continues, boolean requiresResponse)
sendLargeMessageContinuation in interface SessionCallbackpublic void closed()
closed in interface SessionCallbackpublic void disconnect(ServerConsumer consumer, String queueName)
disconnect in interface SessionCallbackpublic boolean hasCredits(ServerConsumer consumer)
SessionCallbackhasCredits in interface SessionCallbackCopyright © 2024 The Apache Software Foundation. All rights reserved.