public static ServiceRegistration registerWavPlayer( BundleContext context, WavPlayer player, Properties props){ return OSGiUtils.registerUniqueService(context, WavPlayer.class.getName(), WavPlayer.PROP_WAV_PLAYER_ID, player.getWavPlayerId(), player, props); }
private static ServiceRegistration registerAnimationPlayer( BundleContext context, Robot.Id robotId){ AnimationPlayer player = new RampedAnimationPlayer( context, robotId, DEFAULT_MAX_RAMP_TIME_MILLISEC); Properties props = new Properties(); String playerId = player.getAnimationPlayerId(); props.put(Robot.PROP_ID, robotId.toString()); ServiceRegistration reg = OSGiUtils.registerUniqueService(context, AnimationPlayer.class.getName(), AnimationPlayer.PROP_PLAYER_ID, playerId, player, props); theLogger.log(Level.INFO, "OSGiAnimationPlayer Service Registered Successfully."); return reg; }