|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.eventadmin.impl.security.EventAdminSecurityDecorator
public class EventAdminSecurityDecorator
This class is a decorator for an EventAdmin service. It secures the service by checking any call from a given bundle (i.e., the caller) to the admins post or send methods for the appropriate permissions based on a given permission factory. This methods then in turn throw a SecurityException in case the given bundle doesn't pass the check or delegate the call to decorated service instance, respectively.
| Constructor Summary | |
|---|---|
EventAdminSecurityDecorator(org.osgi.framework.Bundle bundle,
org.osgi.service.event.EventAdmin admin)
The constructor of this decorator. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Overrides equals() and delegates the call to the decorated service instance. |
int |
hashCode()
Overrides hashCode() and returns the hash code of the decorated service instance. |
void |
postEvent(org.osgi.service.event.Event event)
This method checks whether the given (i.e., calling) bundle has appropriate permissions to post an event to the targeted topic. |
void |
sendEvent(org.osgi.service.event.Event event)
This method checks whether the given (i.e., calling) bundle has appropriate permissions to send an event to the targeted topic. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventAdminSecurityDecorator(org.osgi.framework.Bundle bundle,
org.osgi.service.event.EventAdmin admin)
bundle - The calling bundle used to determine appropriate permissionsadmin - The decorated service instance| Method Detail |
|---|
public void postEvent(org.osgi.service.event.Event event)
postEvent in interface org.osgi.service.event.EventAdminevent - The event that should be postedEventAdmin.postEvent(org.osgi.service.event.Event)public void sendEvent(org.osgi.service.event.Event event)
sendEvent in interface org.osgi.service.event.EventAdminevent - The event that should be sendEventAdmin.sendEvent(org.osgi.service.event.Event)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode(),
EventAdminpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - The object to compare with this decorator's service instanceObject.equals(java.lang.Object),
EventAdmin
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||