Class ProtonServerReceiverContext
java.lang.Object
org.apache.activemq.artemis.protocol.amqp.proton.ProtonInitializable
org.apache.activemq.artemis.protocol.amqp.proton.ProtonAbstractReceiver
org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerReceiverContext
- All Implemented Interfaces:
ProtonDeliveryHandler
- Direct Known Subclasses:
AMQPFederationAddressConsumer.AMQPFederatedAddressDeliveryHandler
This is the equivalent for the ServerProducer
-
Nested Class Summary
Nested classes/interfaces inherited from class ProtonAbstractReceiver
ProtonAbstractReceiver.FlowControlRunner, ProtonAbstractReceiver.ReceiverState -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SimpleStringprotected booleanprotected RoutingTypeprotected RoutingTypeprotected SimpleStringprotected org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicyFields inherited from class ProtonAbstractReceiver
connection, coreLargeMessageReader, coreMessageReader, coreTunnelingEnabled, creditRunnable, creditTopUpRunner, drainCreditOnNoSpace, drainTimeout, largeMessageReader, messageReader, minLargeMessageSize, pendingQuiesceTimeout, pendingSettles, pendingStop, protonSession, receiver, routingContext, sessionSPI, standardMessageReader, state, useModifiedFields inherited from class ProtonInitializable
initialized -
Constructor Summary
ConstructorsConstructorDescriptionProtonServerReceiverContext(AMQPSessionCallback sessionSPI, AMQPConnectionContext connection, AMQPSessionContext protonSession, org.apache.qpid.proton.engine.Receiver receiver) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactualDelivery(Message message, org.apache.qpid.proton.engine.Delivery delivery, org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotations, org.apache.qpid.proton.engine.Receiver receiver, org.apache.activemq.artemis.core.transaction.Transaction tx) Perform the actual message processing for an inbound message.voidclose(boolean remoteLinkClose) protected RoutingTypededuceRoutingType(Message message) protected SimpleStringReturns either the fixed address assigned to this sender, or the last address used by an anonymous relay sender; if this is an anonymous relay and no send has occurred then this method returnsnull.Returns the routing type the client defined for this receiver using capabilities set in the linkTargetor an address prefix.protected final RoutingTypegetExplicitRoutingType(org.apache.qpid.proton.amqp.Symbol[] symbols, SimpleString address) Returns the routing type of the actual link target (address or queue) if one could be determined based on broker defined defaults.protected final RoutingTypegetImplicitRoutingType(SimpleString address) Return the explicit routing type if one was provided and if not then return the implicit routing type as a fallback.voidfinal booleanReturns true if the context is an anonymous relay (no target address).Methods inherited from class ProtonAbstractReceiver
calculatedUpdateRefill, close, closeCurrentReader, createCreditRunnable, createCreditRunnable, deliveryFailed, doCreditTopUpRun, enableCoreTunneling, failIfCoreTunnelNotEnabled, getConfiguredMinLargeMessageSize, getConnection, getEffectiveDefaultOutcome, getLinkQuiesceTimeout, getSessionContext, incrementSettle, isAddressFull, isBellowThreshold, isBusy, isClosed, isDraining, isDrainOnTransientDeliveryErrors, isStarted, isStopped, isStopping, isUseModifiedForTransientDeliveryErrors, onExceptionWhileReading, onFlow, onMessage, onMessageComplete, outcomeSupported, recoverContext, settle, start, stop, topUpCreditIfNeeded, trySelectMessageReaderMethods inherited from class ProtonInitializable
isInitialized
-
Field Details
-
address
-
lastAddress
-
lastAddressPolicy
protected org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy lastAddressPolicy -
addressAlreadyClashed
protected boolean addressAlreadyClashed -
explicitRoutingType
-
implicitRoutingType
-
-
Constructor Details
-
ProtonServerReceiverContext
public ProtonServerReceiverContext(AMQPSessionCallback sessionSPI, AMQPConnectionContext connection, AMQPSessionContext protonSession, org.apache.qpid.proton.engine.Receiver receiver)
-
-
Method Details
-
initialize
- Specified by:
initializein classProtonInitializable- Throws:
Exception
-
getAddressInUse
Description copied from class:ProtonAbstractReceiverReturns either the fixed address assigned to this sender, or the last address used by an anonymous relay sender; if this is an anonymous relay and no send has occurred then this method returnsnull.- Specified by:
getAddressInUsein classProtonAbstractReceiver- Returns:
- either the fixed address assigned to this sender, or the last address used by an anonymous relay sender;
if this is an anonymous relay and no send has occurred then this method returns
null
-
isAnonymousRelay
public final boolean isAnonymousRelay()Returns true if the context is an anonymous relay (no target address).- Returns:
- true if the context is an anonymous relay (no target address)
-
getPreferredRoutingType
Return the explicit routing type if one was provided and if not then return the implicit routing type as a fallback.- Returns:
- the highest priority routing type this receiver selected.
-
getExplicitRoutingType
Returns the routing type the client defined for this receiver using capabilities set in the linkTargetor an address prefix.- Returns:
- the explicit routing type defined in the link target capabilities or via address prefix.
-
getImplicitRoutingType
Returns the routing type of the actual link target (address or queue) if one could be determined based on broker defined defaults.- Returns:
- the implicit routing type based on the target address.
-
actualDelivery
protected void actualDelivery(Message message, org.apache.qpid.proton.engine.Delivery delivery, org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotations, org.apache.qpid.proton.engine.Receiver receiver, org.apache.activemq.artemis.core.transaction.Transaction tx) Description copied from class:ProtonAbstractReceiverPerform the actual message processing for an inbound message. The subclass either consumes and settles the message in place or hands it off to another intermediary who is responsible for eventually settling the newly read message.- Specified by:
actualDeliveryin classProtonAbstractReceiver- Parameters:
message- The message as provided from the remote or after local transformation by subclass.delivery- The proton delivery where the message bytes where read fromdeliveryAnnotations- The delivery annotations if present that accompanied the incoming message.receiver- The proton receiver that represents the link over which the message was sent.tx- The transaction under which the incoming message was sent.
-
deduceRoutingType
-
close
- Specified by:
closein interfaceProtonDeliveryHandler- Overrides:
closein classProtonAbstractReceiver- Throws:
ActiveMQAMQPException
-
getImplicitRoutingType
-
getExplicitRoutingType
protected final RoutingType getExplicitRoutingType(org.apache.qpid.proton.amqp.Symbol[] symbols, SimpleString address)
-