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