public class Message
extends java.lang.Object
Middleware
,
MessageListener
,
com.eibus.transport.URI
Constructor and Description |
---|
Message(byte[] text)
Constructs a new message with specified text as body.
|
Message(byte[] text,
java.lang.String target)
Constructs a new message with specified text as body, and the specified targets.
|
Message(byte[] text,
java.lang.String[] targets)
Constructs a new message with specified text as body, and the specified targets.
|
Modifier and Type | Method and Description |
---|---|
void |
clearProblemDetected() |
Message |
copy()
Returns a copy of this message.
|
int |
getEnvelope()
Returns the envelope (which contains the XML-tree) of the message
|
MessageOptions |
getMessageOptions()
The messageoptions of this message.
|
java.lang.String[] |
getTargets()
Returns the addresses to which this message is targeted.
|
byte[] |
getText()
Return the message body
|
boolean |
isProblemDetected() |
void |
setEnvelope(int envelope)
Sets the envelop of the message
|
void |
setMessageOptions(MessageOptions messageOptions,
boolean clearProblemDetection)
Sets the messageoptions of this message.
|
void |
setProblemDetected() |
void |
setTargets(java.lang.String[] targets)
Sets the target addresses for this message.
|
void |
setText(byte[] text)
Set the text of the message.
|
java.lang.String |
toString()
Converts the bytes in the message to String
|
public Message(byte[] text)
text
- The body of the message.public Message(byte[] text, java.lang.String target)
text
- The body of the message.target
- The target address to which this message can be sent.public Message(byte[] text, java.lang.String[] targets)
text
- The body of the message.targets
- The target addresses to which this message can be sent.public void setTargets(java.lang.String[] targets)
addresses
- The target addresses to which this message can be sent. If this parameter has a null
value, it will be converted in a String array of length 0.public java.lang.String[] getTargets()
public void setText(byte[] text)
public byte[] getText()
public Message copy()
public java.lang.String toString()
toString
in class java.lang.Object
public void clearProblemDetected()
public boolean isProblemDetected()
public void setProblemDetected()
public MessageOptions getMessageOptions()
public void setMessageOptions(MessageOptions messageOptions, boolean clearProblemDetection)
messageOptions
- clearProblemDetection
- public int getEnvelope()
public void setEnvelope(int envelope)