org.papoose.event
Class SecureEventAdminServiceFactory
java.lang.Object
org.papoose.event.EventAdminServiceFactory
org.papoose.event.SecureEventAdminServiceFactory
- All Implemented Interfaces:
- org.osgi.framework.ServiceFactory
public class SecureEventAdminServiceFactory
- extends EventAdminServiceFactory
- Version:
- $Revision: $ $Date: $
|
Constructor Summary |
SecureEventAdminServiceFactory(org.osgi.framework.BundleContext context,
java.util.concurrent.ExecutorService executor,
java.util.concurrent.ScheduledExecutorService scheduledExecutor)
|
|
Method Summary |
java.lang.Object |
getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration)
|
protected boolean |
permissionCheck(EventAdminServiceFactory.EventListener listener,
org.osgi.service.event.Event event)
Check to make sure that the listener has permission to subscribe to the
topic of the event. |
void |
ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration,
java.lang.Object service)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SecureEventAdminServiceFactory
public SecureEventAdminServiceFactory(org.osgi.framework.BundleContext context,
java.util.concurrent.ExecutorService executor,
java.util.concurrent.ScheduledExecutorService scheduledExecutor)
getService
public java.lang.Object getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration)
- Specified by:
getService in interface org.osgi.framework.ServiceFactory- Overrides:
getService in class EventAdminServiceFactory
ungetService
public void ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration,
java.lang.Object service)
- Specified by:
ungetService in interface org.osgi.framework.ServiceFactory- Overrides:
ungetService in class EventAdminServiceFactory
permissionCheck
protected boolean permissionCheck(EventAdminServiceFactory.EventListener listener,
org.osgi.service.event.Event event)
- Description copied from class:
EventAdminServiceFactory
- Check to make sure that the listener has permission to subscribe to the
topic of the event. The default implementation always returns
true.
This method is overridden by SecureEventAdminServiceFactory.
- Overrides:
permissionCheck in class EventAdminServiceFactory
- Parameters:
listener - the listener whose permission is to be checkedevent - the event that is to be protected
- Returns:
true if the listener has permission to access the event, false otherwise.
Copyright © 2010. All Rights Reserved.