private void parsePresences() {
   if (preferences == null) {
     preferences = new HashMap<String, String>();
     for (final IPacket child : getChildren()) {
       preferences.put(child.getName(), child.getText());
     }
   }
 }
Example #2
0
 /**
  * Return true if the given packet is a message
  *
  * @param packet
  * @return
  */
 public static boolean is(final IPacket packet) {
   return PACKET_NAME.equals(packet.getName());
 }
Example #3
0
 public void setBody(final String msg) {
   if (msg != null) {
     final IPacket body = addChild("body", null);
     body.setText(msg);
   }
 }