Codota Logo
EnginesTracker.<init>
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
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

  • Finding current android device location
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • notifyDataSetChanged (ArrayAdapter)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Collectors (java.util.stream)
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now