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

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

public class ContextSecurityManagerImpl
extends GenericActivator
implements ContextSecurityManager

Implementation of the ContextSecurityManager interface.

Author:
sanjin

Constructor Summary
ContextSecurityManagerImpl()
           
 
Method Summary
 void add(AuthorizationMethod method)
          Add specified additional AuthorizationMethod to COPAL.
 boolean authorized(ContextListener listener, ContextEvent event)
          Returns if specified ContextListener is allowed to receive specified ContextEvent.
 boolean isStarted()
          Returns if this ContextSecurityManager 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

ContextSecurityManagerImpl

public ContextSecurityManagerImpl()
Method Detail

isStarted

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

Returns:
if this ContextSecurityManager 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

add

public void add(AuthorizationMethod method)
Description copied from interface: ContextSecurityManager
Add specified additional AuthorizationMethod to COPAL. If an AuthorizationMethod with same name is already registered, the specified AuthorizationMethod will not be added.

Specified by:
add in interface ContextSecurityManager
Parameters:
method - the AuthorizationMethod.

authorized

public boolean authorized(ContextListener listener,
                          ContextEvent event)
Description copied from interface: ContextSecurityManager
Returns if specified ContextListener is allowed to receive specified ContextEvent.

Specified by:
authorized in interface ContextSecurityManager
Parameters:
listener - the ContextListener.
event - the ContextEvent.
Returns:
if specified ContextListener is allowed to receive specified ContextEvent.


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