Ejemplo n.º 1
0
 /**
  * Sets the name associated with this entry.
  *
  * @param name the name.
  */
 public void setName(String name) {
   // Do nothing if the name hasn't changed.
   if (name != null && name.equals(this.name)) {
     return;
   }
   this.name = name;
   RosterPacket packet = new RosterPacket();
   packet.setType(IQ.Type.SET);
   packet.addRosterItem(toRosterItem(this));
   connection.sendPacket(packet);
 }