public void invite ( String sessionId , Collection < IPublisherInfo > invitees , boolean cancel ) { if ( invitees == null || invitees . isEmpty ( ) ) { return ; } List < Recipient > recipients = new ArrayList <> ( ) ; for ( IPublisherInfo invitee : invitees ) { recipients . add ( new Recipient ( RecipientType . SESSION , invitee . getSessionId ( ) ) ) ; } String eventData = sessionId + ( cancel ? "" : "^" + self . getUserName ( ) ) ; Recipient [ ] recips = new Recipient [ recipients . size ( ) ] ; eventManager . fireRemoteEvent ( EVENT_INVITE , eventData , recipients . toArray ( recips ) ) ; }
Sends an invitation request to the specified invitees .