Package com.sissi.protocol.iq.disco

Examples of com.sissi.protocol.iq.disco.Disco.parent()


    Disco disco = protocol.cast(Disco.class);
    // 如果一个用户以不同资源进入房间则仅显示其中一个
    for (JID each : super.iSubscribedWho((super.build(protocol.parent().getTo())))) {
      disco.add(new Item(each.asStringWithBare(), each.resource()));
    }
    context.write(disco.parent().reply().setType(ProtocolType.RESULT));
    return true;
  }
}
View Full Code Here


  public boolean input(JIDContext context, Protocol protocol) {
    Disco disco = protocol.cast(Disco.class);
    for (JID each : super.whoSubscribedMe(super.build(protocol.parent().getTo()))) {
      disco.add(new Item(each.asString()));
    }
    context.write(disco.parent().reply().setType(ProtocolType.RESULT));
    return true;
  }
}
View Full Code Here

  public boolean input(JIDContext context, Protocol protocol) {
    Disco disco = protocol.cast(Disco.class);
    for (Relation each : super.myRelations(context.jid())) {
      disco.add(new Item(each.jid(), each.name()));
    }
    context.write(disco.parent().reply().setType(ProtocolType.RESULT));
    return true;
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.