|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.nmt.mgp.Message
public class Message
A message with a list of options, to be sent via MGP to the EMG Server. The message text is hex encoded for safe transportation.
| Constructor Summary | |
|---|---|
Message()
Create a new message. |
|
Message(java.io.BufferedReader in)
Create a new message. |
|
Message(OptionHolder options)
Create a new message. |
|
Message(java.lang.String destaddr)
Create a basic message with destaddr. |
|
Message(java.lang.String destaddr,
char[] data)
Create a basic text message with binary data. |
|
Message(java.lang.String destaddr,
java.lang.String text)
Create a basic text message. |
|
| Method Summary | |
|---|---|
void |
addHex(java.lang.String hex)
Add message data which is already hex encoded. |
void |
addOption(MgpOption option)
Add an option to this message. |
void |
addText(char[] data)
Add binary message data to this message. |
void |
addText(java.lang.String text)
Adds message text to this message. |
void |
addUdh(char[] udh)
Add a UDH (User Data Header) to message. |
void |
deleteOption(MgpOption option)
Delete a specific MGP option from message. |
boolean |
equals(Message msg)
Compare this messge with another. |
int |
getId()
Gets the message id. |
OptionHolder |
getOptions()
Returns the message options. |
void |
load(java.io.BufferedReader in)
Loads the message options from an input stream. |
void |
save(java.io.BufferedWriter out)
Saves the message options to an output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Message()
public Message(OptionHolder options)
public Message(java.io.BufferedReader in)
throws java.io.IOException
java.io.IOException
public Message(java.lang.String destaddr,
java.lang.String text)
destaddr - the destination address,
stored as the option Mgp.MGP_OPTION_DESTADDRtext - the message text,
stored as the option Mgp.MGP_OPTION_MESSAGE
public Message(java.lang.String destaddr,
char[] data)
destaddr - the destination address,
stored as the option Mgp.MGP_OPTION_DESTADDRdata - the message text,
stored as the option Mgp.MGP_OPTION_MESSAGEpublic Message(java.lang.String destaddr)
destaddr - the destination address,
stored as the option Mgp.MGP_OPTION_DESTADDR| Method Detail |
|---|
public OptionHolder getOptions()
public void addOption(MgpOption option)
public void addText(java.lang.String text)
public void addText(char[] data)
public void addHex(java.lang.String hex)
public void addUdh(char[] udh)
public void deleteOption(MgpOption option)
public int getId()
public boolean equals(Message msg)
getId()
public void load(java.io.BufferedReader in)
throws java.io.IOException
in - the input stream, already opened
java.io.IOException - if an error occurs while reading
public void save(java.io.BufferedWriter out)
throws java.io.IOException
out - the output stream, already initiated
java.io.IOException - if an error occurs while writing
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||