Class ProtonServerReceiverContext

All Implemented Interfaces:
ProtonDeliveryHandler
Direct Known Subclasses:
AMQPFederationAddressConsumer.AMQPFederatedAddressDeliveryHandler

public class ProtonServerReceiverContext extends ProtonAbstractReceiver
This is the equivalent for the ServerProducer
  • Field Details

    • address

      protected SimpleString address
    • lastAddress

      protected SimpleString lastAddress
    • lastAddressPolicy

      protected org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy lastAddressPolicy
    • addressAlreadyClashed

      protected boolean addressAlreadyClashed
    • explicitRoutingType

      protected RoutingType explicitRoutingType
    • implicitRoutingType

      protected RoutingType implicitRoutingType
  • Constructor Details

  • Method Details

    • initialize

      public void initialize() throws Exception
      Specified by:
      initialize in class ProtonInitializable
      Throws:
      Exception
    • getAddressInUse

      protected SimpleString getAddressInUse()
      Description copied from class: ProtonAbstractReceiver
      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.
      Specified by:
      getAddressInUse in class ProtonAbstractReceiver
      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

      public RoutingType 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

      public RoutingType getExplicitRoutingType()
      Returns the routing type the client defined for this receiver using capabilities set in the link Target or an address prefix.
      Returns:
      the explicit routing type defined in the link target capabilities or via address prefix.
    • getImplicitRoutingType

      public RoutingType 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: ProtonAbstractReceiver
      Perform 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:
      actualDelivery in class ProtonAbstractReceiver
      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 from
      deliveryAnnotations - 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

      protected RoutingType deduceRoutingType(Message message)
    • close

      public void close(boolean remoteLinkClose) throws ActiveMQAMQPException
      Specified by:
      close in interface ProtonDeliveryHandler
      Overrides:
      close in class ProtonAbstractReceiver
      Throws:
      ActiveMQAMQPException
    • getImplicitRoutingType

      protected final RoutingType getImplicitRoutingType(SimpleString address)
    • getExplicitRoutingType

      protected final RoutingType getExplicitRoutingType(org.apache.qpid.proton.amqp.Symbol[] symbols, SimpleString address)