Examples of RosterRelation


Examples of com.sissi.ucenter.relation.roster.RosterRelation

    this.remove = remove;
  }

  @Override
  public RelationCascade update(JID master, JID slave) {
    RosterRelation relation = this.ourRelation.ourRelation(master, slave).cast(RosterRelation.class);
    // 激活则广播
    if (relation.activate()) {
      this.broadcastProtocol.broadcast(master, new IQ().setId(UUID.randomUUID().toString()).add(new Roster(new GroupItem(relation))).setType(ProtocolType.SET));
    }
    return this;
  }
View Full Code Here

Examples of com.sissi.ucenter.relation.roster.RosterRelation

  private final String[] relations = new String[] { RosterSubscription.NONE.toString(), RosterSubscription.FROM.toString() };

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    RosterRelation roster = super.ourRelation(super.build(protocol.getTo()), context.jid()).cast(RosterRelation.class);
    return roster.in(this.relations) && roster.ask();
  }
View Full Code Here

Examples of com.sissi.ucenter.relation.roster.RosterRelation

  private final String[] relations = new String[] { RosterSubscription.TO.toString(), RosterSubscription.BOTH.toString() };

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    RosterRelation roster = super.ourRelation(super.build(protocol.getTo()), context.jid()).cast(RosterRelation.class);
    return roster.in(this.relations) || roster.ask();
  }
View Full Code Here

Examples of com.sissi.ucenter.relation.roster.RosterRelation

   *
   * @see com.sissi.pipeline.Input#input(com.sissi.context.JIDContext, com.sissi.protocol.Protocol)
   */
  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    RosterRelation relation = super.ourRelation(context.jid(), super.build(protocol.getTo())).cast(RosterRelation.class);
    return relation.ask() ? true : this.establishAndReturn(context, protocol.cast(Presence.class), relation);
  }
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.