Class ClientStreamDelivery
- All Implemented Interfaces:
- StreamDelivery
StreamDelivery implementation that provides the mechanics of reading message
 types from an incoming split framed transfer.- 
Field SummaryFields inherited from class org.apache.qpid.protonj2.client.impl.ClientDeliverabledelivery
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaborted()Check if theStreamDeliveryhas been marked as aborted by the remote sender.Decodes theStreamDeliverypayload and returns aMapcontaining a copy of any associatedDeliveryAnnotationsthat were transmitted with theMessagepayload of thisStreamDelivery.booleanCheck if theStreamDeliveryhas been marked as complete by the remote sender.message()Decode theStreamDeliverypayload and return anMessageobject.Create and return anInputStreamthat reads the raw payload bytes of the givenStreamDelivery.receiver()protected ClientStreamDeliveryself()Methods inherited from class org.apache.qpid.protonj2.client.impl.ClientDeliverableaccept, disposition, messageFormat, modified, reject, release, remoteSettled, remoteState, settle, settled, stateMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.qpid.protonj2.client.StreamDeliveryaccept, disposition, messageFormat, modified, reject, release, remoteSettled, remoteState, settle, settled, state
- 
Method Details- 
self- Specified by:
- selfin class- ClientDeliverable<ClientStreamDelivery,- ClientStreamReceiver> 
 
- 
receiver- Specified by:
- receiverin interface- StreamDelivery
- Returns:
- the StreamReceiverthat originated thisStreamDelivery.
 
- 
abortedpublic boolean aborted()Description copied from interface:StreamDeliveryCheck if theStreamDeliveryhas been marked as aborted by the remote sender.- Specified by:
- abortedin interface- StreamDelivery
- Returns:
- true if this context has been marked as aborted previously.
 
- 
completedpublic boolean completed()Description copied from interface:StreamDeliveryCheck if theStreamDeliveryhas been marked as complete by the remote sender.- Specified by:
- completedin interface- StreamDelivery
- Returns:
- true if this context has been marked as being the complete.
 
- 
messageDescription copied from interface:StreamDeliveryDecode theStreamDeliverypayload and return anMessageobject.If the incoming message carried any delivery annotations they can be accessed via the StreamDelivery.annotations()method. Re-sending the returned message will not also send the incoming delivery annotations, the sender must include them in theSender.send(Message, Map)call if they are to be forwarded onto the next recipient.Calling this message claims the payload of the delivery for the returned Messageand excludes use of theStreamDelivery.rawInputStream()method of theStreamDeliveryobject. Calling theStreamDelivery.rawInputStream()method after calling this method throwsClientIllegalStateException.- Specified by:
- messagein interface- StreamDelivery
- Returns:
- a Messageinstance that wraps the decoded payload.
- Throws:
- ClientException- if an error occurs while decoding the payload.
 
- 
annotationsDescription copied from interface:StreamDeliveryDecodes theStreamDeliverypayload and returns aMapcontaining a copy of any associatedDeliveryAnnotationsthat were transmitted with theMessagepayload of thisStreamDelivery.Calling this message claims the payload of the delivery for the returned Mapand the decodedMessagethat can be accessed via theStreamDelivery.message()method and excludes use of theStreamDelivery.rawInputStream()method of theStreamDeliveryobject. Calling theStreamDelivery.rawInputStream()method after calling this method throwsClientIllegalStateException.- Specified by:
- annotationsin interface- StreamDelivery
- Returns:
- copy of the delivery annotations that were transmitted with the Messagepayload.
- Throws:
- ClientException- if an error occurs while decoding the payload.
 
- 
rawInputStreamDescription copied from interface:StreamDeliveryCreate and return anInputStreamthat reads the raw payload bytes of the givenStreamDelivery.Calling this method claims the payload of the delivery for the returned InputStreamand excludes use of theStreamDelivery.message()andStreamDelivery.annotations()methods of theStreamDeliveryobject. Closing the returned input stream discards any unread bytes from the delivery payload. Calling theStreamDelivery.message()orStreamDelivery.annotations()methods after calling this method throwsClientIllegalStateException.- Specified by:
- rawInputStreamin interface- StreamDelivery
- Returns:
- an InputStreaminstance that can be used to read the raw delivery payload.
- Throws:
- ClientException- if an error occurs while decoding the payload.
 
 
-