Sends a roster to userID. All the entries of the roster will be sent to the
target user.

@param roster the roster to send
@param targetUserID the user that will receive the roster entries
@throws NotConnectedException
@throws InterruptedException
433952
public void send(Roster roster, Jid targetUserID) throws NotConnectedException, InterruptedException {
        // Create a new message to send the roster
        Message msg = new Message(targetUserID);
        // Create a RosterExchange Package and add it to the message
        RosterExchange rosterExchange = new RosterExchange(roster);
        msg.addExtension(rosterExchange);

        XMPPConnection connection = weakRefConnection.get();
        // Send the message that contains the roster
        connection.sendStanza(msg);
    }
462709
private synchronized void sendTransportCandidateOffer(TransportCandidate cand) throws NotConnectedException, InterruptedException {
        if (!cand.isNull()) {
            // Offer our new candidate...
            addOfferedCandidate(cand);
            JingleContent content = parentNegotiator.getJingleContent();
            content.addJingleTransport(getJingleTransport(cand));
            Jingle jingle = new Jingle(JingleActionEnum.TRANSPORT_INFO);
            jingle.addContent(content);

            // We SHOULD NOT be sending packets directly.
            // This circumvents the state machinery.
            // TODO - work this into the state machinery.
            session.sendFormattedJingle(jingle);
        }
    }
1259571
static RosterPacket.Item toRosterItem(RosterEntry entry, String name) {
        return toRosterItem(entry, name, false);
    }
73974
public Response deleteRosterEntry(String username, String jid) {
		return restClient.delete("users/" + username + "/roster/" + jid, new HashMap<String, String>());
	}
253170
public boolean setRosterStore(RosterStore rosterStore) {
        this.rosterStore = rosterStore;
        try {
            reload();
        }
        catch (InterruptedException | NotLoggedInException | NotConnectedException e) {
            LOGGER.log(Level.FINER, "Could not reload roster", e);
            return false;
        }
        return true;
    }
1190484
def send_roster_push(recipient)
      doc = Nokogiri::XML::Document.new
      node = doc.create_element('iq',
        'id'   => Kit.uuid,
        'to'   => recipient.user.jid.to_s,
        'type' => 'set')
      node << doc.create_element('query', 'xmlns' => NAMESPACES[:roster]) do |query|
        query << to_roster_xml
      end
      recipient.write(node)
    end
445811
def on_session_start(self, data):
        # pylint: disable=W0613
        
        # Send initial presence
        self.send_presence(ppriority=self._initial_priority)

        # Request roster
        self.get_roster()
1056839
public void setUserIds(java.util.Collection<String> userIds) {
        if (userIds == null) {
            this.userIds = null;
            return;
        }

        this.userIds = new com.amazonaws.internal.SdkInternalList<String>(userIds);
    }
818216
public void sendMessage(String text) throws NotConnectedException, InterruptedException {
        Message message = createMessage();
        message.setBody(text);
        connection.sendStanza(message);
    }
119007
private void send(T value)
  {
    for (SubscriberNode sub : _subscribers) {
      sub.next(value);
    }
    
    long seq = _sequence++;
    int size = _consumers.size();
    
    if (size > 0) {
      int index = (int) (seq % size);
      
      _consumers.get(index).next(value);
    }
  }
1123431
@Override
    public SendObjectMessage recipients(Collection<? extends ApiBaseUser> recipients) {
        for(ApiBaseUser user : recipients) {
            this.recipients.add(user.getName());
        }
        return this;
    }
106864
public void addRosterEntry(RosterEntry rosterEntry) {
        // Obtain a String[] from the roster entry groups name
        List<String> groupNamesList = new ArrayList<>();
        String[] groupNames;
        for (RosterGroup group : rosterEntry.getGroups()) {
            groupNamesList.add(group.getName());
        }
        groupNames = groupNamesList.toArray(new String[groupNamesList.size()]);

        // Create a new Entry based on the rosterEntry and add it to the packet
        RemoteRosterEntry remoteRosterEntry = new RemoteRosterEntry(rosterEntry.getJid(),
                rosterEntry.getName(), groupNames);

        addRosterEntry(remoteRosterEntry);
    }
840569
def add_to_roster(display_name=nil,groups=[])
      item_fields = {:jid => jid.bare}
      item_fields[:name] = display_name if display_name

      query = connection.iq_stanza({:type => 'set'},
				x('query',{:xmlns => Roster},
					x('item',item_fields),
					groups.map { |grp| x('group',grp) }
				)
			)

      send_iq_stanza_fibered query
    end
351488
@Override
    protected void sendToNode(Message message, short node, InetSocketAddress address) {
        try {
            if (LOG.isDebugEnabled())
                LOG.debug("Sending to node {} ({}): {}", new Object[]{node, address, message});
            message.cloneDataBuffers(); // important, as we're going to be doing actual sending on another thread

            final NodePeer peer = peers.get(node);
            if (peer == null)
                throw new NodeNotFoundException(node);

            peer.sendMessage(message);
            executor.submit(peer);
        } catch (InterruptedException ex) {
            LOG.error("InterruptedException", ex);
            throw new RuntimeException(ex);
        } catch (Exception ex) {
            LOG.error("Error while sending message " + message + " to node " + node, ex);
        }
    }
451036
def roster(opts, runner=None, utils=None, whitelist=None):
    '''
    
    '''
    return LazyLoader(
        _module_dirs(opts, 'roster'),
        opts,
        tag='roster',
        whitelist=whitelist,
        pack={
            '__runner__': runner,
            '__utils__': utils,
        },
    )
690669
public void setTeamMembers(java.util.Collection<TeamMember> teamMembers) {
        if (teamMembers == null) {
            this.teamMembers = null;
            return;
        }

        this.teamMembers = new java.util.ArrayList<TeamMember>(teamMembers);
    }
625799
public function onPartChannels(UserEventInterface $event, EventQueueInterface $queue)
    {
        $this->joinOnMatch($event->getNick(), $event, $queue);
    }