at.ac.tuwien.infosys.sm4all.copal.core.internal
Class ContextStateImpl

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.osgi.GenericActivator
      extended by at.ac.tuwien.infosys.sm4all.copal.core.internal.ContextStateImpl
All Implemented Interfaces:
DependencyTrackerCustomizer, ContextState, org.osgi.framework.BundleActivator

public class ContextStateImpl
extends GenericActivator
implements ContextState

Implementation of the ContextState interface.

Author:
sanjin

Constructor Summary
ContextStateImpl()
          Creates an instance of the ContextState implementation.
 
Method Summary
 ContextEvent getCurrentEvent(java.lang.String eventName)
          Returns current ContextEvent that has type equal to specified event name.
 ContextEvent[] getCurrentEvents()
          Returns all current ContextEvents.
 boolean isStarted()
          Returns if this ContextState has been started by an OSGi framework.
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
 

Constructor Detail

ContextStateImpl

public ContextStateImpl()
Creates an instance of the ContextState implementation.

Method Detail

isStarted

public boolean isStarted()
Returns if this ContextState has been started by an OSGi framework.

Returns:
if this ContextState has been started by an OSGi framework.

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

getCurrentEvents

public ContextEvent[] getCurrentEvents()
Description copied from interface: ContextState
Returns all current ContextEvents.

Specified by:
getCurrentEvents in interface ContextState
Returns:
all current ContextEvents.

getCurrentEvent

public ContextEvent getCurrentEvent(java.lang.String eventName)
Description copied from interface: ContextState
Returns current ContextEvent that has type equal to specified event name.

Specified by:
getCurrentEvent in interface ContextState
Parameters:
eventName - the name of the ContextEventType.
Returns:
current ContextEvent that has type name equal to specified eventName or null if such ContextEvents was never published.


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