private void parsePresences() {
   if (preferences == null) {
     preferences = new HashMap<String, String>();
     for (final IPacket child : getChildren()) {
       preferences.put(child.getName(), child.getText());
     }
   }
 }
示例#2
0
文件: Message.java 项目: vznet/emite
 /**
  * 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());
 }
示例#3
0
文件: Message.java 项目: vznet/emite
 public void setBody(final String msg) {
   if (msg != null) {
     final IPacket body = addChild("body", null);
     body.setText(msg);
   }
 }