public class MessageImpl extends Object implements ProtonJMessage
Message.FactoryDEFAULT_PRIORITY| Constructor and Description |
|---|
MessageImpl()
Deprecated.
This constructor's visibility will be reduced to the default scope in a future release.
Client code outside this module should use
Message.Factory#create() instead |
MessageImpl(Header header,
DeliveryAnnotations deliveryAnnotations,
MessageAnnotations messageAnnotations,
Properties properties,
ApplicationProperties applicationProperties,
Section body,
Footer footer)
Deprecated.
This constructor's visibility will be reduced to the default scope in a future release.
Client code outside this module should instead use
Message.Factory#create(Header, DeliveryAnnotations, MessageAnnotations, Properties, ApplicationProperties, Section, Footer) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
int |
decode(byte[] data,
int offset,
int length)
TODO describe what happens if the data does not represent a complete message.
|
void |
decode(ByteBuffer buffer) |
int |
encode(byte[] data,
int offset,
int length)
Encodes up to
length bytes of the message into the provided byte array,
starting at position offset. |
int |
encode(WritableBuffer buffer) |
int |
encode2(byte[] data,
int offset,
int length) |
String |
getAddress() |
ApplicationProperties |
getApplicationProperties() |
Section |
getBody() |
String |
getContentEncoding() |
String |
getContentType() |
Object |
getCorrelationId() |
long |
getCreationTime() |
DeliveryAnnotations |
getDeliveryAnnotations() |
long |
getDeliveryCount() |
MessageError |
getError() |
long |
getExpiryTime() |
Footer |
getFooter() |
String |
getGroupId() |
long |
getGroupSequence() |
Header |
getHeader() |
MessageAnnotations |
getMessageAnnotations() |
Object |
getMessageId() |
short |
getPriority() |
Properties |
getProperties() |
String |
getReplyTo() |
String |
getReplyToGroupId() |
String |
getSubject() |
long |
getTtl() |
byte[] |
getUserId() |
boolean |
isDurable() |
boolean |
isFirstAcquirer() |
void |
setAddress(String to) |
void |
setApplicationProperties(ApplicationProperties applicationProperties) |
void |
setBody(Section body) |
void |
setContentEncoding(String contentEncoding) |
void |
setContentType(String contentType) |
void |
setCorrelationId(Object correlationId) |
void |
setCreationTime(long creationTime) |
void |
setDeliveryAnnotations(DeliveryAnnotations deliveryAnnotations) |
void |
setDeliveryCount(long deliveryCount) |
void |
setDurable(boolean durable) |
void |
setExpiryTime(long absoluteExpiryTime) |
void |
setFirstAcquirer(boolean firstAcquirer) |
void |
setFooter(Footer footer) |
void |
setGroupId(String groupId) |
void |
setGroupSequence(long groupSequence) |
void |
setHeader(Header header) |
void |
setMessageAnnotations(MessageAnnotations messageAnnotations) |
void |
setMessageId(Object messageId) |
void |
setPriority(short priority) |
void |
setProperties(Properties properties) |
void |
setReplyTo(String replyTo) |
void |
setReplyToGroupId(String replyToGroupId) |
void |
setSubject(String subject) |
void |
setTtl(long ttl) |
void |
setUserId(byte[] userId) |
String |
toString() |
@Deprecated public MessageImpl()
Message.Factory#create() instead@Deprecated public MessageImpl(Header header, DeliveryAnnotations deliveryAnnotations, MessageAnnotations messageAnnotations, Properties properties, ApplicationProperties applicationProperties, Section body, Footer footer)
Message.Factory#create(Header, DeliveryAnnotations, MessageAnnotations, Properties, ApplicationProperties, Section, Footer)public long getDeliveryCount()
getDeliveryCount in interface Messagepublic short getPriority()
getPriority in interface Messagepublic boolean isFirstAcquirer()
isFirstAcquirer in interface Messagepublic void setDurable(boolean durable)
setDurable in interface Messagepublic void setDeliveryCount(long deliveryCount)
setDeliveryCount in interface Messagepublic void setFirstAcquirer(boolean firstAcquirer)
setFirstAcquirer in interface Messagepublic void setPriority(short priority)
setPriority in interface Messagepublic Object getMessageId()
getMessageId in interface Messagepublic long getGroupSequence()
getGroupSequence in interface Messagepublic String getReplyToGroupId()
getReplyToGroupId in interface Messagepublic long getCreationTime()
getCreationTime in interface Messagepublic String getAddress()
getAddress in interface Messagepublic String getReplyTo()
getReplyTo in interface Messagepublic String getGroupId()
getGroupId in interface Messagepublic String getContentType()
getContentType in interface Messagepublic long getExpiryTime()
getExpiryTime in interface Messagepublic Object getCorrelationId()
getCorrelationId in interface Messagepublic String getContentEncoding()
getContentEncoding in interface Messagepublic String getSubject()
getSubject in interface Messagepublic void setGroupSequence(long groupSequence)
setGroupSequence in interface Messagepublic void setCreationTime(long creationTime)
setCreationTime in interface Messagepublic void setSubject(String subject)
setSubject in interface Messagepublic void setGroupId(String groupId)
setGroupId in interface Messagepublic void setAddress(String to)
setAddress in interface Messagepublic void setExpiryTime(long absoluteExpiryTime)
setExpiryTime in interface Messagepublic void setReplyToGroupId(String replyToGroupId)
setReplyToGroupId in interface Messagepublic void setContentEncoding(String contentEncoding)
setContentEncoding in interface Messagepublic void setContentType(String contentType)
setContentType in interface Messagepublic void setReplyTo(String replyTo)
setReplyTo in interface Messagepublic void setCorrelationId(Object correlationId)
setCorrelationId in interface Messagepublic void setMessageId(Object messageId)
setMessageId in interface Messagepublic DeliveryAnnotations getDeliveryAnnotations()
getDeliveryAnnotations in interface Messagepublic MessageAnnotations getMessageAnnotations()
getMessageAnnotations in interface Messagepublic Properties getProperties()
getProperties in interface Messagepublic ApplicationProperties getApplicationProperties()
getApplicationProperties in interface Messagepublic void setDeliveryAnnotations(DeliveryAnnotations deliveryAnnotations)
setDeliveryAnnotations in interface Messagepublic void setMessageAnnotations(MessageAnnotations messageAnnotations)
setMessageAnnotations in interface Messagepublic void setProperties(Properties properties)
setProperties in interface Messagepublic void setApplicationProperties(ApplicationProperties applicationProperties)
setApplicationProperties in interface Messagepublic int decode(byte[] data,
int offset,
int length)
Messagepublic void decode(ByteBuffer buffer)
public int encode(byte[] data,
int offset,
int length)
Messagelength bytes of the message into the provided byte array,
starting at position offset.
TODO describe what happens if length is smaller than the encoded form, Currently
Proton-J throws an exception. What does Proton-C do?public int encode2(byte[] data,
int offset,
int length)
encode2 in interface ProtonJMessagepublic int encode(WritableBuffer buffer)
encode in interface ProtonJMessagepublic MessageError getError()
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.