Package com.sissi.ucenter.relation.muc

Examples of com.sissi.ucenter.relation.muc.MucRelation.activate()


  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    MucRelation relation = super.ourRelation(context.jid(), super.build(protocol.parent().getTo())).cast(MucRelation.class);
    return relation.activate() && !relation.outcast() ? true : this.proxy.input(context, protocol.parent());
  }
}
View Full Code Here


  private final Error error = new ServerError().type(ProtocolType.AUTH).add(Forbidden.DETAIL);

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    MucRelation relation = super.ourRelation(context.jid(), super.build(protocol.parent().getTo())).cast(MucRelation.class);
    return relation.activate() && ItemAffiliation.OWNER.equals(relation.affiliation()) ? true : this.writeAndReturn(context, protocol);
  }

  private boolean writeAndReturn(JIDContext context, Protocol protocol) {
    context.write(protocol.parent().reply().setError(this.error));
    return false;
View Full Code Here

  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.getTo());
    String nickname = group.resource();
    MucRelation relation = super.ourRelation(context.jid(), group).cast(MucRelation.class);
    // relation.activate(),如果已进入房间. group.resource().equals(relation.name()), 昵称未变
    return relation.activate() ? group.resource().equals(relation.name()) ? this.resend ? this.proxy.input(context, protocol) : false : this.writeAndReturn(context, group, nickname, relation) : true;
  }

  private boolean writeAndReturn(JIDContext context, JID group, String nickname, MucRelation relation) {
    Room room = this.room.build(group);
    // 通知其他房客昵称修改
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.