public class ProtonServerReceiverContext extends ProtonInitializable implements ProtonDeliveryHandler
| Modifier and Type | Field and Description |
|---|---|
protected SimpleString |
address |
protected AMQPConnectionContext |
connection |
protected Runnable |
creditRunnable
We create this AtomicRunnable with setRan.
|
protected AMQPSessionContext |
protonSession |
protected org.apache.qpid.proton.engine.Receiver |
receiver |
protected AMQPSessionCallback |
sessionSPI |
protected Runnable |
spiFlow |
| Constructor and Description |
|---|
ProtonServerReceiverContext(AMQPSessionCallback sessionSPI,
AMQPConnectionContext connection,
AMQPSessionContext protonSession,
org.apache.qpid.proton.engine.Receiver receiver) |
| Modifier and Type | Method and Description |
|---|---|
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,
ProtonServerReceiverContext context)
This Credit Runnable may be used in Mock tests to simulate the credit semantic here
|
void |
deliveryFailed(org.apache.qpid.proton.engine.Delivery delivery,
org.apache.qpid.proton.engine.Receiver receiver,
Exception e) |
void |
drain(int credits) |
int |
drained() |
void |
flow() |
RoutingType |
getRoutingType(org.apache.qpid.proton.engine.Receiver receiver,
SimpleString address) |
int |
incrementSettle() |
void |
initialise() |
static boolean |
isBellowThreshold(int credit,
int pending,
int threshold) |
boolean |
isDraining() |
void |
onFlow(int credits,
boolean drain) |
void |
onMessage(org.apache.qpid.proton.engine.Delivery delivery) |
void |
settle(org.apache.qpid.proton.engine.Delivery settlement) |
isInitializedprotected final AMQPConnectionContext connection
protected final AMQPSessionContext protonSession
protected final org.apache.qpid.proton.engine.Receiver receiver
protected SimpleString address
protected final AMQPSessionCallback sessionSPI
protected final Runnable creditRunnable
protected final Runnable spiFlow
public ProtonServerReceiverContext(AMQPSessionCallback sessionSPI, AMQPConnectionContext connection, AMQPSessionContext protonSession, org.apache.qpid.proton.engine.Receiver receiver)
public static Runnable createCreditRunnable(int refill, int threshold, org.apache.qpid.proton.engine.Receiver receiver, AMQPConnectionContext connection, ProtonServerReceiverContext context)
public static Runnable createCreditRunnable(int refill, int threshold, org.apache.qpid.proton.engine.Receiver receiver, AMQPConnectionContext connection)
public static boolean isBellowThreshold(int credit,
int pending,
int threshold)
public static int calculatedUpdateRefill(int refill,
int credits,
int pending)
protected void clearLargeMessage()
public void onFlow(int credits,
boolean drain)
onFlow in interface ProtonDeliveryHandlerpublic void initialise()
throws Exception
initialise in class ProtonInitializableExceptionpublic RoutingType getRoutingType(org.apache.qpid.proton.engine.Receiver receiver, SimpleString address)
public void onMessage(org.apache.qpid.proton.engine.Delivery delivery)
throws ActiveMQAMQPException
onMessage in interface ProtonDeliveryHandlerActiveMQAMQPExceptionpublic void deliveryFailed(org.apache.qpid.proton.engine.Delivery delivery,
org.apache.qpid.proton.engine.Receiver receiver,
Exception e)
public 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 ProtonDeliveryHandlerActiveMQAMQPExceptionpublic int incrementSettle()
public void settle(org.apache.qpid.proton.engine.Delivery settlement)
public void flow()
public void drain(int credits)
public int drained()
public boolean isDraining()
Copyright © 2020 The Apache Software Foundation. All Rights Reserved.