Package com.swiftmq.amqp.v100.client
Interface DeliveryMemory
- All Known Implementing Classes:
DefaultDeliveryMemory
public interface DeliveryMemory
Specifies a memory to store unsettled deliveries of a link (producer and consumer).
- Author:
- IIT Software GmbH, Bremen/Germany, (c) 2012, All Rights Reserved
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addUnsettledDelivery
(UnsettledDelivery unsettledDelivery) Adds an unsettled delivery which consists of a delivery tag, the delivery state and the AMQP message.void
deliverySettled
(DeliveryTag deliveryTag) Removes an unsettled delivery from the memory.Returns the link name,int
Returns the number of unsettled deliveries contained in this memory.Returns a collection of all unsettled deliveries.void
setLinkName
(String name) Will be called from the link to set its link name.
-
Method Details
-
getLinkName
String getLinkName()Returns the link name,- Returns:
- link name
-
setLinkName
Will be called from the link to set its link name. This is only done if the name has not been set before and ensures that new created links that use this delivery memory use the same link name as before.- Parameters:
name
-
-
addUnsettledDelivery
Adds an unsettled delivery which consists of a delivery tag, the delivery state and the AMQP message.- Parameters:
unsettledDelivery
- unsettled delivery
-
deliverySettled
Removes an unsettled delivery from the memory.- Parameters:
deliveryTag
- delivery tag
-
getNumberUnsettled
int getNumberUnsettled()Returns the number of unsettled deliveries contained in this memory.- Returns:
- number unsettled deliveries
-
getUnsettled
Collection<UnsettledDelivery> getUnsettled()Returns a collection of all unsettled deliveries. The delivery memory remains untouched so the returned map is a copy (or better a clone) of the content.- Returns:
- unsettled deliveries
-