Class ProtonServerSenderContext
java.lang.Object
org.apache.activemq.artemis.protocol.amqp.proton.ProtonInitializable
org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerSenderContext
- All Implemented Interfaces:
ProtonDeliveryHandler
- Direct Known Subclasses:
ProtonClientSenderContext
This is the Equivalent for the ServerConsumer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Runnableprotected final AMQPConnectionContextprotected static final byte[]protected MessageWriterprotected final AMQPSessionContextprotected final org.apache.qpid.proton.engine.Senderprotected final AMQPSessionCallbackFields inherited from class ProtonInitializable
initialized -
Constructor Summary
ConstructorsConstructorDescriptionProtonServerSenderContext(AMQPConnectionContext connection, org.apache.qpid.proton.engine.Sender sender, AMQPSessionContext protonSession, AMQPSessionCallback server) ProtonServerSenderContext(AMQPConnectionContext connection, org.apache.qpid.proton.engine.Sender sender, AMQPSessionContext protonSession, AMQPSessionCallback server, SenderController senderController) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose(boolean remoteLinkClose) voidclose(org.apache.qpid.proton.amqp.transport.ErrorCondition condition) intdeliverMessage(org.apache.activemq.artemis.core.server.MessageReference messageReference, org.apache.activemq.artemis.core.server.ServerConsumer consumer) handle an out going message from ActiveMQ Artemis, send via the Proton Senderprotected voidorg.apache.activemq.artemis.core.server.ServerConsumerprotected Stringorg.apache.qpid.proton.engine.SenderbooleanvoidCreate the actual underlying ActiveMQ Artemis Server ConsumervoidonFlow(int currentCredits, boolean drain) voidonMessage(org.apache.qpid.proton.engine.Delivery delivery) setBeforeDelivery(Consumer<? super org.apache.activemq.artemis.core.server.MessageReference> beforeDelivery) voidsettle(org.apache.qpid.proton.engine.Delivery delivery) voidstart()Methods inherited from class ProtonInitializable
isInitialized
-
Field Details
-
EMPTY_DELIVERY_TAG
protected static final byte[] EMPTY_DELIVERY_TAG -
protonSession
-
sender
protected final org.apache.qpid.proton.engine.Sender sender -
connection
-
sessionSPI
-
afterDelivery
-
messageWriter
-
-
Constructor Details
-
ProtonServerSenderContext
public ProtonServerSenderContext(AMQPConnectionContext connection, org.apache.qpid.proton.engine.Sender sender, AMQPSessionContext protonSession, AMQPSessionCallback server) -
ProtonServerSenderContext
public ProtonServerSenderContext(AMQPConnectionContext connection, org.apache.qpid.proton.engine.Sender sender, AMQPSessionContext protonSession, AMQPSessionCallback server, SenderController senderController)
-
-
Method Details
-
setBeforeDelivery
public ProtonServerSenderContext setBeforeDelivery(Consumer<? super org.apache.activemq.artemis.core.server.MessageReference> beforeDelivery) -
getBrokerConsumer
public org.apache.activemq.artemis.core.server.ServerConsumer getBrokerConsumer() -
getClientId
-
getSessionContext
-
getSender
public org.apache.qpid.proton.engine.Sender getSender() -
onFlow
public void onFlow(int currentCredits, boolean drain) - Specified by:
onFlowin interfaceProtonDeliveryHandler
-
hasCredits
public boolean hasCredits() -
start
- Throws:
ActiveMQAMQPException
-
initialize
Create the actual underlying ActiveMQ Artemis Server Consumer- Specified by:
initializein classProtonInitializable- Throws:
Exception
-
close
public void close(org.apache.qpid.proton.amqp.transport.ErrorCondition condition) throws ActiveMQAMQPException - Specified by:
closein interfaceProtonDeliveryHandler- Throws:
ActiveMQAMQPException
-
close
- Specified by:
closein interfaceProtonDeliveryHandler- Throws:
ActiveMQAMQPException
-
onMessage
- Specified by:
onMessagein interfaceProtonDeliveryHandler- Throws:
ActiveMQAMQPException
-
doAck
-
settle
public void settle(org.apache.qpid.proton.engine.Delivery delivery) -
checkState
public void checkState() -
deliverMessage
-