public static ManagedServiceGroup startVisemeFrameSourceStreamGroup( ManagedServiceFactory fact, Robot.Id robotId, String speechServiceId, InputStream visemeConfigStream){ String groupId = "viseme/" + robotId.getRobtIdString() + "/" + speechServiceId; ManagedServiceGroup group = new ManagedServiceGroup(fact, getStreamLifecycles(groupId, robotId, speechServiceId, visemeConfigStream), groupId, null); group.start(); return group; }
public static List<ManagedService> launchDefaultBlender( BundleContext context, Robot.Id robotId, long blenderIntervalMsec){ ManagedServiceGroup bsg = new DefaultBlenderServiceGroup( context, robotId, blenderIntervalMsec, null); bsg.start(); return bsg.getServices(); }
@Override public ManagedServiceGroup adapt(Configuration<String> a) { ManagedServiceGroup g = buildGroup(myFactory, a); if(myStartFlag){ g.start(); } return g; } }
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); }
public static ManagedServiceGroup startVisemeFrameSourceGroup( ManagedServiceFactory fact, Robot.Id robotId, String speechServiceId, String visemeConfigPath){ String groupId = "viseme/" + robotId.getRobtIdString() + "/" + speechServiceId; ManagedServiceGroup group = new ManagedServiceGroup(fact, getLifecycles(groupId, robotId, speechServiceId, visemeConfigPath), groupId, null); group.start(); return group; }