public void send ( RosterEntry rosterEntry , 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 ( ) ; rosterExchange . addRosterEntry ( rosterEntry ) ; msg . addExtension ( rosterExchange ) ; XMPPConnection connection = weakRefConnection . get ( ) ; // Send the message that contains the roster connection . sendStanza ( msg ) ; }
Sends a roster entry to userID .