private static Adapter<List<ServiceReference>, List<Reference>> getRefListAdapter(){ if(theRefListAdapter == null){ theRefListAdapter = new BatchAdapter(OSGiReference.getReferenceAdapter()); } return theRefListAdapter; } private static Adapter<List<ServiceReference>, List<Reference>> theRefListAdapter;
public static ManagedServiceGroup buildGroup( ManagedServiceFactory factory, Configuration<String> conf){ String groupId = conf.getPropertyValue( String.class, CONFIG_GROUP_ID); Properties props = conf.getPropertyValue( Properties.class, CONFIG_GROUP_PROPERTIES); List<Configuration<String>> lifecycleConfigs = conf.getPropertyValue( List.class, CONF_SELFBUILD_LIFCEYCLES); Adapter<Configuration<String>,ServiceLifecycleProvider> selfBuilder = conf.getPropertyValue(Adapter.class, CONF_GENERIC_SELF_BUILDER); List<ServiceLifecycleProvider> lifecycles = new BatchAdapter(selfBuilder).adapt(lifecycleConfigs); return new ManagedServiceGroup(factory, lifecycles, groupId, props); }