question: public void addGroups ( String [ ] newGroups ) throws IOException { testArrayForNullElement ( newGroups ) ; checkGroups ( newGroups ) ; synchronized ( registrars ) { if ( terminated ) throw new IllegalStateException ( "discovery terminated" ) ; if ( groups == null ) throw new UnsupportedOperationException ( "can't add to \"any groups\"" ) ; Collection req = new ArrayList ( newGroups . length ) ; for ( int i = 0 ; i < newGroups . length ; i ++ ) { if ( groups . add ( newGroups [ i ] ) ) req . add ( newGroups [ i ] ) ; } if ( ! req . isEmpty ( ) ) requestGroups ( req ) ; } }
target:  Add a set of groups to the set to be discovered. The caller must have DiscoveryPermission for each group.