Package com.sissi.ucenter.relation.roster

Examples of com.sissi.ucenter.relation.roster.RosterRelation.ask()


  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


  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

   * @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);
  }

  private boolean establishAndReturn(JIDContext context, Presence presence, RosterRelation relation) {
    super.establish(context.jid(), new PresenceRosterRelation(super.build(presence.getTo()), presence, relation));
    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.