/** * Creates a new {@link EnginesTracker} for the parsed {@link BundleContext} * and engine names. * Examples: * <code><pre> * //Track all active engines with a customiser * new EnginesTracker(context,null,customiser); * * //Track all engines referenced by a Chain and use the customiser * //to react on changes * new EnginesTracker(context,chain.getEngineNames(),customiser); * </pre></code> * @param context the bundle context used to track engines * @param engineNames the names of the engines to track. Parse <code>null</code> * or an {@link Collections#emptySet()} to track all engines * @param customizer the {@link ServiceTrackerCustomizer} used with this tracker. */ public EnginesTracker(BundleContext context, Set<String> engineNames, ServiceTrackerCustomizer customizer){ if(context == null){ throw new IllegalArgumentException("The parsed BundleContext MUST NOT be NULL!"); } initEngineTracker(context,engineNames,customizer); }
/** * Creates a new {@link EnginesTracker} for the parsed {@link BundleContext} * and engine names. * Examples: * <code><pre> * //Track all active engines with a customiser * new EnginesTracker(context,null,customiser); * * //Track all engines referenced by a Chain and use the customiser * //to react on changes * new EnginesTracker(context,chain.getEngineNames(),customiser); * </pre></code> * @param context the bundle context used to track engines * @param engineNames the names of the engines to track. Parse <code>null</code> * or an {@link Collections#emptySet()} to track all engines * @param customizer the {@link ServiceTrackerCustomizer} used with this tracker. */ public EnginesTracker(BundleContext context, Set<String> engineNames, ServiceTrackerCustomizer customizer){ if(context == null){ throw new IllegalArgumentException("The parsed BundleContext MUST NOT be NULL!"); } initEngineTracker(context,engineNames,customizer); }
protected EnginesTracker(){/* nothing to do here */ } /** * Creates a new {@link EnginesTracker} for the parsed {@link BundleContext} * and engine names. * Examples: * <code><pre> * //Track all active engines * new EnginesTracker(context); * * //Track only the langId engine * new EnginesTracker(context,langId); * </pre></code> * @param context The bundle context used to track engines * @param engineNames the name of the engines to track. If empty * all engines are tracked. */ public EnginesTracker(BundleContext context, String...engineNames){ if(context == null){ throw new IllegalArgumentException("The parsed BundleContext MUST NOT be NULL!"); } final Set<String> names; if(engineNames == null){ names = Collections.emptySet(); } else { names = new HashSet<String>(Arrays.asList(engineNames)); } initEngineTracker(context,names,null); } /**
protected EnginesTracker(){/* nothing to do here */ } /** * Creates a new {@link EnginesTracker} for the parsed {@link BundleContext} * and engine names. * Examples: * <code><pre> * //Track all active engines * new EnginesTracker(context); * * //Track only the langId engine * new EnginesTracker(context,langId); * </pre></code> * @param context The bundle context used to track engines * @param engineNames the name of the engines to track. If empty * all engines are tracked. */ public EnginesTracker(BundleContext context, String...engineNames){ if(context == null){ throw new IllegalArgumentException("The parsed BundleContext MUST NOT be NULL!"); } final Set<String> names; if(engineNames == null){ names = Collections.emptySet(); } else { names = new HashSet<String>(Arrays.asList(engineNames)); } initEngineTracker(context,names,null); } /**