congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
EnginesTracker.open
Code IndexAdd Tabnine to your IDE (free)

How to use
open
method
in
org.apache.stanbol.enhancer.servicesapi.impl.EnginesTracker

Best Java code snippets using org.apache.stanbol.enhancer.servicesapi.impl.EnginesTracker.open (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.open();
org.apache.stanbol.enhancer.servicesapi.implEnginesTrackeropen

Javadoc

Starts tracking based on the configuration parsed in the constructor

Popular methods of EnginesTracker

  • <init>
    Creates a new EnginesTracker for the parsed BundleContextand engine names. Examples: //Track all ac
  • close
    Closes this tracker
  • 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
  • setScale (BigDecimal)
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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