Class ClientStreamSender.ClientOutgoingEnvelope
- java.lang.Object
- 
- org.apache.qpid.protonj2.client.impl.ClientStreamSender.ClientOutgoingEnvelope
 
- 
- All Implemented Interfaces:
- org.apache.qpid.protonj2.client.impl.ClientTransactionContext.Sendable
 - Enclosing class:
- ClientStreamSender
 
 public static final class ClientStreamSender.ClientOutgoingEnvelope extends Object implements org.apache.qpid.protonj2.client.impl.ClientTransactionContext.Sendable 
- 
- 
Constructor SummaryConstructors Constructor Description ClientOutgoingEnvelope(ClientStreamSender sender, OutgoingDelivery delivery, int messageFormat, ProtonBuffer payload, boolean complete, ClientFuture<StreamTracker> request)Create a new In-flight Send instance that is a continuation on an existing delivery.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientStreamSender.ClientOutgoingEnvelopeabort()booleanaborted()ClientExceptioncreateSendTimedOutException()OutgoingDeliverydelivery()voiddiscard()If the context that is overseeing this send is in a failed state it can request that the send be discarded without notification to the sender that it failed, this occurs most often in an in-doubt transaction context where all work will be dropped once the user attempt to retire the transaction.ClientStreamSender.ClientOutgoingEnvelopefailed(ClientException exception)ProtonBufferpayload()voidsend(DeliveryState state, boolean settled)Performs the actual send of delivery data which might be enlisted in a transaction or may simply be a passed through based on the context and its state.ScheduledFuture<?>sendTimeout()voidsendTimeout(ScheduledFuture<?> sendTimeout)Sets theScheduledFuturewhich should be used when a send cannot be immediately performed.ClientStreamSender.ClientOutgoingEnvelopesucceeded()
 
- 
- 
- 
Constructor Detail- 
ClientOutgoingEnvelopepublic ClientOutgoingEnvelope(ClientStreamSender sender, OutgoingDelivery delivery, int messageFormat, ProtonBuffer payload, boolean complete, ClientFuture<StreamTracker> request) Create a new In-flight Send instance that is a continuation on an existing delivery.- Parameters:
- sender- The- ClientSenderinstance that is attempting to send this encoded message.
- messageFormat- The message format code to assign the send if this is the first delivery.
- delivery- The- OutgoingDeliverycontext this envelope will be added to.
- payload- The payload that comprises this portion of the send.
- complete- Indicates if the encoded payload represents the complete transfer or if more is coming.
- request- The requesting operation that initiated this send.
 
 
- 
 - 
Method Detail- 
sendTimeoutpublic ScheduledFuture<?> sendTimeout() - Returns:
- the ScheduledFutureused to determine when the send should fail if no credit available to write.
 
 - 
sendTimeoutpublic void sendTimeout(ScheduledFuture<?> sendTimeout) Sets theScheduledFuturewhich should be used when a send cannot be immediately performed.- Parameters:
- sendTimeout- The- ScheduledFuturethat will fail the send if not cancelled once it has been performed.
 
 - 
payloadpublic ProtonBuffer payload() 
 - 
deliverypublic OutgoingDelivery delivery() 
 - 
abortpublic ClientStreamSender.ClientOutgoingEnvelope abort() 
 - 
abortedpublic boolean aborted() 
 - 
discardpublic void discard() Description copied from interface:org.apache.qpid.protonj2.client.impl.ClientTransactionContext.SendableIf the context that is overseeing this send is in a failed state it can request that the send be discarded without notification to the sender that it failed, this occurs most often in an in-doubt transaction context where all work will be dropped once the user attempt to retire the transaction.- Specified by:
- discardin interface- org.apache.qpid.protonj2.client.impl.ClientTransactionContext.Sendable
 
 - 
succeededpublic ClientStreamSender.ClientOutgoingEnvelope succeeded() 
 - 
failedpublic ClientStreamSender.ClientOutgoingEnvelope failed(ClientException exception) 
 - 
sendpublic void send(DeliveryState state, boolean settled) Description copied from interface:org.apache.qpid.protonj2.client.impl.ClientTransactionContext.SendablePerforms the actual send of delivery data which might be enlisted in a transaction or may simply be a passed through based on the context and its state. The sender need not be aware of this though as the context will provide a delivery state that is appropriate for this send which would encapsulate any sender provided delivery state.- Specified by:
- sendin interface- org.apache.qpid.protonj2.client.impl.ClientTransactionContext.Sendable
- Parameters:
- state- Sender provided delivery state or context decorated version.
- settled- If the send should be sent settled or not.
 
 - 
createSendTimedOutExceptionpublic ClientException createSendTimedOutException() 
 
- 
 
-