congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
EnginesTracker.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.stanbol.enhancer.servicesapi.impl.EnginesTracker
constructor

Best Java code snippets using org.apache.stanbol.enhancer.servicesapi.impl.EnginesTracker.<init> (Showing top 4 results out of 315)

origin: apache/stanbol

public AllActiveEnginesChain(BundleContext context, String name) {
  if(context == null){
    throw new IllegalArgumentException("The parsed BundleContext MUST NOT be NULL!");
  }
  if(name == null || name.isEmpty()){
    throw new IllegalArgumentException("The parsed Chain name MUST NOT be NULL!");
  }
  this.context = context;
  this.name = name;
  Set<String> trackAll = Collections.emptySet();
  this.tracker = new EnginesTracker(context, 
    trackAll, //empty set to track all engines
    this);
  this.tracker.open();
}
  
origin: apache/stanbol

@Activate
protected void activate(ComponentContext ctx) {
  final BundleContext bc = ctx.getBundleContext();
  engineTracker = new EnginesTracker(bc, Collections.<String>emptySet(), 
    new ServiceTrackerCustomizer() {
      
      @Override
      public Object addingService(ServiceReference reference) {
        Object service = bc.getService(reference);
        if(service != null){
          _enginesCache = null; //rebuild the cache on the next call
        }
        return service;
      }
      @Override
      public void modifiedService(ServiceReference reference, Object service) {
        _enginesCache = null; //rebuild the cache on the next call
      }
      @Override
      public void removedService(ServiceReference reference, Object service) {
        if(reference != null){
          bc.ungetService(reference);
          _enginesCache = null; //rebuild the cache on the next call
        }
      }
      
    });
  engineTracker.open();
}
origin: org.apache.stanbol/org.apache.stanbol.enhancer.jersey

@Activate
protected void activate(ComponentContext ctx) {
  final BundleContext bc = ctx.getBundleContext();
  engineTracker = new EnginesTracker(bc, Collections.<String>emptySet(), 
    new ServiceTrackerCustomizer() {
      
      @Override
      public Object addingService(ServiceReference reference) {
        Object service = bc.getService(reference);
        if(service != null){
          _enginesCache = null; //rebuild the cache on the next call
        }
        return service;
      }
      @Override
      public void modifiedService(ServiceReference reference, Object service) {
        _enginesCache = null; //rebuild the cache on the next call
      }
      @Override
      public void removedService(ServiceReference reference, Object service) {
        if(reference != null){
          bc.ungetService(reference);
          _enginesCache = null; //rebuild the cache on the next call
        }
      }
      
    });
  engineTracker.open();
}
origin: apache/stanbol

tracker = new EnginesTracker(ctx.getBundleContext(), chain.keySet(),this);
tracker.open();
org.apache.stanbol.enhancer.servicesapi.implEnginesTracker<init>

Javadoc

Protected constructor intended to be used by subclasses that do not want to compete the initialisation as part of construction(e.g. implementations of the EnhancementEngineManager interface the follow the OSGI component model).

Users that use this constructor MUST make sure to call #initEngineTracker(BundleContext, Set, ServiceTrackerCustomizer). Note that initEngineTracker method does NOT call #open().

Access to the internal state is provided by the protected getters for the ServiceTracker and the NameBasedServiceTrackingState and the public #getTrackedEngines() method.

Popular methods of EnginesTracker

  • close
    Closes this tracker
  • open
    Starts tracking based on the configuration parsed in the constructor
  • getEngine
  • getActiveEngineNames
  • getReference
  • initEngineTracker
    Initialises the EnginesTracker by using the parsed parameter. This will create a copy of the parsed

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • putExtra (Intent)
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Notification (javax.management)
  • JCheckBox (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now