Package org.apache.qpid.protonj2.client
Interface DeliveryState
- All Known Implementing Classes:
- ClientDeliveryState,- ClientDeliveryState.ClientAccepted,- ClientDeliveryState.ClientModified,- ClientDeliveryState.ClientRejected,- ClientDeliveryState.ClientReleased,- ClientDeliveryState.ClientTransactional
public interface DeliveryState
Conveys the outcome of a Delivery either incoming or outgoing.
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionstatic DeliveryStateaccepted()getType()default booleanstatic DeliveryStatemodified(boolean failed, boolean undeliverable) Create a new Modified outcome with the given failure state.static DeliveryStateCreate a new Modified outcome with the given failure state.static DeliveryStateCreate a new Rejected outcome with the given condition and description.static DeliveryStateCreate a new Rejected outcome with the given condition and description.static DeliveryStatereleased()
- 
Method Details- 
getTypeDeliveryState.Type getType()- Returns:
- the type that the given DeliveryStaterepresents.
 
- 
isAccepteddefault boolean isAccepted()- Returns:
- true if the DeliveryStaterepresents an Accepted outcome.
 
- 
accepted- Returns:
- an instance of an AMQP Accepted delivery outcome.
 
- 
released- Returns:
- an instance of an AMQP Released delivery outcome.
 
- 
rejectedCreate a new Rejected outcome with the given condition and description.- Parameters:
- condition- the condition that lead to the rejected outcome.
- description- a meaningful description of the reason for the rejection.
- Returns:
- an instance of an AMQP Rejected delivery outcome.
 
- 
rejectedCreate a new Rejected outcome with the given condition and description.- Parameters:
- condition- the condition that lead to the rejected outcome.
- description- a meaningful description of the reason for the rejection.
- info- a- Mapcontaining additional information about the rejection.
- Returns:
- an instance of an AMQP Rejected delivery outcome.
 
- 
modifiedCreate a new Modified outcome with the given failure state.- Parameters:
- failed- boolean indicating if delivery failed or not.
- undeliverable- boolean indicating if the delivery cannot be sent to this receiver again.
- Returns:
- an instance of an AMQP Modified delivery outcome.
 
- 
modifiedstatic DeliveryState modified(boolean failed, boolean undeliverable, Map<String, Object> annotations) Create a new Modified outcome with the given failure state.- Parameters:
- failed- boolean indicating if delivery failed or not.
- undeliverable- boolean indicating if the delivery cannot be sent to this receiver again.
- annotations- updated annotation for the delivery that this outcome applies to.
- Returns:
- an instance of an AMQP Modified delivery outcome.
 
 
-