Examples of Jid


Examples of com.sissi.context.JID

    this.relationContext = relationContext;
  }

  @Override
  public AffiliationBroadcast broadcast(JID group, Room room, MucItem item, JIDContext invoker) {
    JID jid = this.jidBuilder.build(item.getJid());
    // 向MUC房客广播MUC JID所有资源岗位变更
    for (Relation relation : this.relationContext.ourRelations(jid, group)) {
      for (JID to : this.relationContext.whoSubscribedMe(group)) {
        this.addressing.findOne(to, true).write(item.presence(room.pull(Dictionary.FIELD_AFFILIATION, String.class)).add(this.adder.add(new XUser(group, to, room.allowed(to, RoomConfig.WHOISEXISTS, null)).item(item.hidden(room.allowed(to, RoomConfig.WHOISALLOW, jid)).relation(relation.cast(MucRelation.class).affiliation(item.getAffiliation(), true)))).cast(XUser.class)));
      }
View Full Code Here

Examples of com.sissi.context.JID

    this.persistent = persistent;
  }

  @Override
  public Recall call(String to) {
    JID jid = this.jidBuilder.build(to);
    JIDContext context = this.addressing.find(jid);
    if (context.binding()) {
      context.write(this.persistent.pull(jid));
    }
    return this;
View Full Code Here

Examples of com.sissi.context.JID

    this.room = room;
  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.getTo());
    String subject = room.build(group).pull(Dictionary.FIELD_SUBJECT, String.class);
    if (subject != null) {
      context.write(new Message().noneThread().subject(new Subject(subject)).setType(MessageType.GROUPCHAT).setFrom(group.resource(super.ourRelation(context.jid(), group).name())));
    }
    return true;
  }
View Full Code Here

Examples of com.sissi.context.JID

    this.judger = judger;
  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.getTo());
    MucRelation relation = super.ourRelation(context.jid(), group).cast(MucRelation.class).noneRole();
    Room room = this.room.build(group);
    Presence presence = new Presence();
    for (Relation each : super.myRelations(group)) {
      JID to = super.build(each.cast(MucRelation.class).jid());
      super.findOne(to, true).write(presence.clear().add(this.judger.add(new XUser(group, to, room.allowed(to, RoomConfig.WHOISEXISTS)).item(new Item(room.allowed(to, RoomConfig.WHOISALLOW, context.jid()), relation))).cast(XUser.class)).type(PresenceType.UNAVAILABLE).setFrom(protocol.getTo()));
    }
    return true;
  }
View Full Code Here

Examples of com.sissi.context.JID

    this.room = room;
  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID group = super.build(protocol.getTo());
    return this.room.build(group).allowed(context.jid(), RoomConfig.CHANGENICK, group.resource()) ? this.writeAndReturn(context, protocol) : true;
  }
View Full Code Here

Examples of com.sissi.context.JID

*/
public class PresenceRosterUnSubscribed2PresenceProcessor extends ProxyProcessor {

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID to = super.build(protocol.getTo());
    Presence presence = protocol.cast(Presence.class).type(PresenceType.UNAVAILABLE);
    for (JID resource : super.resources(context.jid())) {
      super.broadcast(to, presence.setFrom(resource));
    }
    return true;
View Full Code Here

Examples of com.sissi.context.JID

    this.resend = resend;
  }

  @Override
  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;
  }
View Full Code Here

Examples of com.sissi.context.JID

  private boolean writeAndReturn(JIDContext context, JID group, String nickname, MucRelation relation) {
    Room room = this.room.build(group);
    // 通知其他房客昵称修改
    Presence presence = new Presence();
    for (Relation each : super.myRelations(group)) {
      JID to = super.build(each.cast(MucRelation.class).jid());
      super.findOne(to, true).write(presence.clear().add(this.adder.add(new XUser(group, to, room.allowed(to, RoomConfig.WHOISEXISTS)).item(new Item(room.allowed(to, RoomConfig.WHOISALLOW, context.jid()), nickname, relation))).cast(XUser.class)).type(PresenceType.UNAVAILABLE).setFrom(group.resource(relation.name())));
    }
    return false;
  }
View Full Code Here

Examples of com.sissi.context.JID

*/
public class PresenceRosterUnSubscribed2ItemProcessor extends ProxyProcessor {

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    JID to = super.build(protocol.getTo());
    super.broadcast(to, new IQ().setId(UUID.randomUUID().toString()).add(new Roster(new GroupItem(super.ourRelation(to, context.jid()).cast(RosterRelation.class)))).setType(ProtocolType.SET));
    return true;
  }
View Full Code Here

Examples of de.fu_berlin.inf.dpp.net.JID

      if (msg.getTo() == null) {
        for (User u : sarosSession.getRemoteUsers()) {
          transmitter.sendToProjectUser(u.getJID(), extension);
        }
      } else {
        JID jid = new JID(msg.getTo());
        transmitter.sendToProjectUser(jid, extension);
      }
    } catch (Exception e) {
      log.error(
          prefix()
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.