at.ac.tuwien.infosys.sm4all.copal.api.processor
Class BaseProcessor

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.osgi.GenericActivator
      extended by at.ac.tuwien.infosys.sm4all.copal.api.processor.BaseProcessor
All Implemented Interfaces:
DependencyTrackerCustomizer, ContextProcessor, org.osgi.framework.BundleActivator
Direct Known Subclasses:
AnnotatedProcessor

public abstract class BaseProcessor
extends GenericActivator
implements ContextProcessor

Base ContextProcessor that correctly activates itself with COPAL and is able to process ContextEvents.

Author:
sanjin

Constructor Summary
protected BaseProcessor(java.lang.String name, ProcessorAction... actions)
          Creates an instance of BaseProcessor with specified name and ProcessorActions as return values for getName() and getActions() methods respectively.
 
Method Summary
 ProcessorAction[] getActions()
          Returns the ProcessorAction which this ContextProcessor can process.
 java.lang.String getName()
          Returns the globally unique name of this ContextProcessor.
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.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
 
Methods inherited from interface at.ac.tuwien.infosys.sm4all.copal.api.processor.ContextProcessor
process
 

Constructor Detail

BaseProcessor

protected BaseProcessor(java.lang.String name,
                        ProcessorAction... actions)
Creates an instance of BaseProcessor with specified name and ProcessorActions as return values for getName() and getActions() methods respectively.

Parameters:
name - the name of this ContextProcessor.
actions - the ProcessorActions that this ContextProcessor can process.
Throws:
java.lang.NullPointerException - if specified name or ProcessorAction s array is null.
java.lang.IllegalArgumentException - if specified name is an empty or blank string or ProcessorActions array is empty.
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ContextProcessor
Returns the globally unique name of this ContextProcessor.

Specified by:
getName in interface ContextProcessor
Returns:
the globally unique name of this ContextProcessor.

getActions

public ProcessorAction[] getActions()
Description copied from interface: ContextProcessor
Returns the ProcessorAction which this ContextProcessor can process.

Specified by:
getActions in interface ContextProcessor
Returns:
the ProcessorAction which this ContextProcessor can process.

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.