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

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<ContextEventType>
          extended by at.ac.tuwien.infosys.sm4all.copal.api.conf.EventTypesConfiguration
All Implemented Interfaces:
Configuration<ContextEventType>, DependencyTrackerCustomizer, org.osgi.framework.BundleActivator

public class EventTypesConfiguration
extends BaseConfiguration<ContextEventType>

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

Author:
sanjin

Constructor Summary
EventTypesConfiguration(java.lang.ClassLoader classLoader, java.lang.String fileName)
          Create instance of ContextEventType configuration that uses specified ClassLoader to find the XML configuration file with specified name.
 
Method Summary
 ContextEventType[] getDefined()
          Returns the defined ContextEventTypes in the XML configuration file or an empty array if there was problem reading the file.
 ContextEventType[] getRegistered()
          Returns all registered ContextEventTypes.
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

EventTypesConfiguration

public EventTypesConfiguration(java.lang.ClassLoader classLoader,
                               java.lang.String fileName)
Create instance of ContextEventType 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 ContextEventType[] getDefined()
Returns the defined ContextEventTypes in the XML configuration file or an empty array if there was problem reading the file.

Returns:
the defined ContextEventTypes in the XML configuration file.

getRegistered

public ContextEventType[] getRegistered()
Returns all registered ContextEventTypes.

Returns:
all registered ContextEventTypes.

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.