void processServerFeaturesRequest(Result featureResolveResult) {

        final Set<String> serverFeatureNames = new HashSet<String>();
        serverFeatureNames.addAll(featureResolveResult.getResolvedFeatures());
        serverFeatureNames.addAll(featureResolveResult.getMissing());

        //publish the service that will be used by the launcher to read back the data.
        final Dictionary<String, Object> d = new Hashtable<String, Object>();

        bundleContext.registerService(ServerFeatures.class, new ServerFeatures() {
            @Override
            public String[] getServerFeatureNames() {
                //return newly filtered data
                return serverFeatureNames.toArray(new String[serverFeatureNames.size()]);
            }
        }, d);

        //we're done here.. let liberty proceed to declare itself 'started' =)
    }
void processServerFeaturesRequest ( Result featureResolveResult ) { final Set < String > serverFeatureNames = new HashSet < String > ( ) ; serverFeatureNames . addAll ( featureResolveResult . getResolvedFeatures ( ) ) ; serverFeatureNames . addAll ( featureResolveResult . getMissing ( ) ) ; final Dictionary < String , Object > d = new Hashtable < String , Object > ( ) ; bundleContext . registerService ( ServerFeatures . class , new ServerFeatures ( ) { @ Override public String [ ] getServerFeatureNames ( ) { return serverFeatureNames . toArray ( new String [ serverFeatureNames . size ( ) ] ) ; } } , d ) ; }
Builds a list of required server features and publish it as a service to let the launcher obtain them..
<p>
<em>ONLY</em> takes effect if the Launcher has set the magic server content property