public class Message extends Object
Message object is used to send a message containing a stream of uninterpreted bytes.| Constructor and Description |
|---|
Message() |
Message(String subject,
String reply,
byte[] data) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
Returns the message payload
|
String |
getReplyTo()
Returns the reply subject
|
String |
getSubject()
Returns the message subject
|
Subscription |
getSubscription()
Returns the
Subscription object the message was received on |
void |
setData(byte[] data)
Sets the message payload data
|
void |
setData(byte[] data,
int offset,
int length)
Sets the message payload data
|
void |
setReplyTo(String replyTo)
Sets the message reply subject
|
void |
setSubject(String subject)
Sets the subject of the message
|
String |
toString() |
public byte[] getData()
public String getSubject()
public void setSubject(String subject)
subject - the subject to setpublic String getReplyTo()
public void setReplyTo(String replyTo)
replyTo - the message reply subjectpublic Subscription getSubscription()
Subscription object the message was received onSubscription the message was received onpublic void setData(byte[] data,
int offset,
int length)
data - the dataoffset - the start offset in the datalength - the number of bytes to writepublic void setData(byte[] data)
data - the datapublic String toString()
toString in class ObjectObject.toString()Copyright © 2015–2016 Apcera, Inc.. All rights reserved.