|
||||||||||
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(Bundle bundle,
EventAdmin admin)
The constructor of this decorator. |
Method Summary | |
---|---|
boolean |
equals(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(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(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(Bundle bundle, EventAdmin admin)
bundle
- The calling bundle used to determine appropriate permissionsadmin
- The decorated service instanceMethod Detail |
---|
public void postEvent(Event event)
postEvent
in interface EventAdmin
event
- The event that should be postedEventAdmin.postEvent(org.osgi.service.event.Event)
public void sendEvent(Event event)
sendEvent
in interface EventAdmin
event
- The event that should be sendEventAdmin.sendEvent(org.osgi.service.event.Event)
public int hashCode()
hashCode
in class Object
Object.hashCode()
,
EventAdmin
public boolean equals(Object o)
equals
in class Object
o
- 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 |