Examples of Roster


Examples of com.sissi.protocol.iq.roster.Roster

  @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.protocol.iq.roster.Roster

    }
    return this;
  }

  public RelationCascade remove(JID master, JID slave) {
    this.broadcastProtocol.broadcast(master, new IQ().setId(UUID.randomUUID().toString()).add(new Roster(new GroupItem(slave).addOnEmpty(this.remove).setSubscription(RosterSubscription.REMOVE))).setType(ProtocolType.SET));
    return this;
  }
View Full Code Here

Examples of com.sissi.protocol.iq.roster.Roster

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 com.sissi.protocol.iq.roster.Roster

*/
public class PresenceRosterSubscribe2ItemProcessor extends ProxyProcessor {

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

Examples of com.sissi.protocol.iq.roster.Roster

    this.writeRoster(context, to).writeSubscribed(context, to, presence).writeAvailable(context, to, presence);
    return false;
  }

  private PresenceRosterSubscribe2ReplySelfsProcessor writeRoster(JIDContext context, JID to) {
    super.broadcast(context.jid(), new IQ().setId(UUID.randomUUID().toString()).add(new Roster(new GroupItem(super.ourRelation(context.jid(), to).cast(RosterRelation.class)))).setType(ProtocolType.SET));
    return this;
  }
View Full Code Here

Examples of com.sissi.protocol.iq.roster.Roster

*/
public class PresenceRosterUnSubscribe2ItemProcessor extends ProxyProcessor {

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

Examples of com.sissi.protocol.iq.roster.Roster

public class PresenceRosterSubscribed2ItemProcessor 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 nu.fw.jeti.backend.roster.Roster

    eventListeners = new HashMap<String,List<JETIListener>> (10);
    iqTimerQueue = new IQTimerQueue();
    handlers = new Handlers();
    connect = new Connect(this,iqTimerQueue,handlers);
    server =new Server(this);
    roster = new Roster(this,server);
    //capabilitiesCache = new CapabilitiesCache(this);
    this.start = start;
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.roster.Roster

        ResourceState currentState = registry.getResourceState(resourceId);
        if (currentState != null) {
            registry.setResourceState(resourceId, ResourceState.makeInterested(currentState));
        }

        Roster roster = null;
        try {
            roster = rosterManager.retrieve(from.getBareJID());
            if (roster == null) return handleCannotRetrieveRoster(stanza, sessionContext);
        } catch (RosterException e) {
            return handleCannotRetrieveRoster(stanza, sessionContext);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.roster.Roster

        mutableRoster.addItem(rosterItem);
    }

    public RosterItem getContact(Entity jidUser, Entity jidContact) throws RosterException {
        if (jidUser == null) throw new RosterException("jid not provided");
        Roster roster = retrieve(jidUser);
        if (roster == null) throw new RosterException("roster not available for jid = " + jidUser.getFullQualifiedName());
        return roster.getEntry(jidContact);
    }
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.