public abstract class ProtonAbstractReceiver extends ProtonInitializable implements ProtonDeliveryHandler
| Modifier and Type | Field and Description |
|---|---|
protected int |
amqpCredits |
protected AMQPConnectionContext |
connection |
protected Runnable |
creditRunnable
We create this AtomicRunnable with setRan.
|
protected AMQPLargeMessage |
currentLargeMessage |
protected int |
minCreditRefresh |
protected int |
minLargeMessageSize |
protected int |
pendingSettles |
protected AMQPSessionContext |
protonSession |
protected org.apache.qpid.proton.engine.Receiver |
receiver |
protected AMQPSessionCallback |
sessionSPI |
protected boolean |
useModified |
| Constructor and Description |
|---|
ProtonAbstractReceiver(AMQPSessionCallback sessionSPI,
AMQPConnectionContext connection,
AMQPSessionContext protonSession,
org.apache.qpid.proton.engine.Receiver receiver) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
actualDelivery(AMQPMessage message,
org.apache.qpid.proton.engine.Delivery delivery,
org.apache.qpid.proton.engine.Receiver receiver,
org.apache.activemq.artemis.core.transaction.Transaction tx) |
static int |
calculatedUpdateRefill(int refill,
int credits,
int pending) |
protected void |
clearLargeMessage() |
void |
close(boolean remoteLinkClose) |
void |
close(org.apache.qpid.proton.amqp.transport.ErrorCondition condition) |
static Runnable |
createCreditRunnable(int refill,
int threshold,
org.apache.qpid.proton.engine.Receiver receiver,
AMQPConnectionContext connection)
This Credit Runnable may be used in Mock tests to simulate the credit semantic here
|
static Runnable |
createCreditRunnable(int refill,
int threshold,
org.apache.qpid.proton.engine.Receiver receiver,
AMQPConnectionContext connection,
ProtonAbstractReceiver context)
This Credit Runnable may be used in Mock tests to simulate the credit semantic here
|
abstract void |
flow() |
void |
incrementSettle() |
protected void |
initializeCurrentLargeMessage(org.apache.qpid.proton.engine.Delivery delivery,
org.apache.qpid.proton.engine.Receiver receiver) |
static boolean |
isBellowThreshold(int credit,
int pending,
int threshold) |
void |
onFlow(int credits,
boolean drain) |
void |
onMessage(org.apache.qpid.proton.engine.Delivery delivery) |
protected void |
recoverContext() |
void |
settle(org.apache.qpid.proton.engine.Delivery settlement) |
initialize, isInitializedprotected final AMQPConnectionContext connection
protected final AMQPSessionContext protonSession
protected final org.apache.qpid.proton.engine.Receiver receiver
protected final int amqpCredits
protected final int minCreditRefresh
protected final int minLargeMessageSize
protected final AMQPSessionCallback sessionSPI
protected volatile AMQPLargeMessage currentLargeMessage
protected final Runnable creditRunnable
protected final boolean useModified
protected int pendingSettles
public ProtonAbstractReceiver(AMQPSessionCallback sessionSPI, AMQPConnectionContext connection, AMQPSessionContext protonSession, org.apache.qpid.proton.engine.Receiver receiver)
public static boolean isBellowThreshold(int credit,
int pending,
int threshold)
public static int calculatedUpdateRefill(int refill,
int credits,
int pending)
protected void recoverContext()
protected void clearLargeMessage()
public static Runnable createCreditRunnable(int refill, int threshold, org.apache.qpid.proton.engine.Receiver receiver, AMQPConnectionContext connection, ProtonAbstractReceiver context)
public static Runnable createCreditRunnable(int refill, int threshold, org.apache.qpid.proton.engine.Receiver receiver, AMQPConnectionContext connection)
public void incrementSettle()
public void settle(org.apache.qpid.proton.engine.Delivery settlement)
public void onFlow(int credits,
boolean drain)
onFlow in interface ProtonDeliveryHandlerpublic void onMessage(org.apache.qpid.proton.engine.Delivery delivery)
throws ActiveMQAMQPException
onMessage in interface ProtonDeliveryHandlerActiveMQAMQPExceptionprotected void initializeCurrentLargeMessage(org.apache.qpid.proton.engine.Delivery delivery,
org.apache.qpid.proton.engine.Receiver receiver)
throws Exception
Exceptionpublic void close(boolean remoteLinkClose)
throws ActiveMQAMQPException
close in interface ProtonDeliveryHandlerActiveMQAMQPExceptionpublic void close(org.apache.qpid.proton.amqp.transport.ErrorCondition condition)
throws ActiveMQAMQPException
close in interface ProtonDeliveryHandlerActiveMQAMQPExceptionprotected abstract void actualDelivery(AMQPMessage message, org.apache.qpid.proton.engine.Delivery delivery, org.apache.qpid.proton.engine.Receiver receiver, org.apache.activemq.artemis.core.transaction.Transaction tx)
public abstract void flow()
Copyright © 2021 The Apache Software Foundation. All rights reserved.