at.ac.tuwien.infosys.sm4all.copal.api.conf
Class QueriesConfiguration

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.osgi.GenericActivator
      extended by at.ac.tuwien.infosys.sm4all.copal.api.conf.BaseConfiguration<java.lang.String>
          extended by at.ac.tuwien.infosys.sm4all.copal.api.conf.QueriesConfiguration
All Implemented Interfaces:
Configuration<java.lang.String>, DependencyTrackerCustomizer, org.osgi.framework.BundleActivator

public class QueriesConfiguration
extends BaseConfiguration<java.lang.String>

Configuration helper class that reads definitions of ProcessedEventQuerys from a XML configuration file that can be found in classpath.

Author:
sanjin

Constructor Summary
QueriesConfiguration(java.lang.ClassLoader classLoader, java.lang.String fileName)
          Create instance of ContextQuerys configuration that uses specified ClassLoader to find the XML configuration file with specified name.
 
Method Summary
 ProcessedEventQuery[] getCreated()
          Returns all created ProcessedEventQuerys.
 java.lang.String[] getDefined()
          Returns the names of defined ContextQuerys in the XML configuration file or an empty array if there was problem reading the file.
protected  void start()
          Called when all dependencies are met.
protected  void stop()
          Called when GenericActivator.start() was previously called and one of the dependencies has been unregistered.
 
Methods inherited from class at.ac.tuwien.infosys.sm4all.copal.api.conf.BaseConfiguration
getDocument
 
Methods inherited from class at.ac.tuwien.infosys.sm4all.copal.api.osgi.GenericActivator
addingService, getDependency, modifiedService, register, register, removedService, start, stop, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueriesConfiguration

public QueriesConfiguration(java.lang.ClassLoader classLoader,
                            java.lang.String fileName)
Create instance of ContextQuerys configuration that uses specified ClassLoader to find the XML configuration file with specified name.

Parameters:
classLoader - the ClassLoader.
fileName - the name of the configuration file.
Method Detail

getDefined

public java.lang.String[] getDefined()
Returns the names of defined ContextQuerys in the XML configuration file or an empty array if there was problem reading the file.

Returns:
the names of defined ContextQuerys in the XML configuration file.

getCreated

public ProcessedEventQuery[] getCreated()
Returns all created ProcessedEventQuerys.

Returns:
all created ProcessedEventQuerys.

start

protected void start()
Description copied from class: GenericActivator
Called when all dependencies are met.

Specified by:
start in class GenericActivator

stop

protected void stop()
Description copied from class: GenericActivator
Called when GenericActivator.start() was previously called and one of the dependencies has been unregistered.

Specified by:
stop in class GenericActivator


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.