org.apache.felix.eventadmin.impl.handler
Class EventHandlerProxy

java.lang.Object
  extended by org.apache.felix.eventadmin.impl.handler.EventHandlerProxy

public class EventHandlerProxy
extends java.lang.Object

This is a proxy for event handlers. It gets the real event handler on demand and prepares some information for faster processing. It checks the timeout handling for the implementation as well as blacklisting the handler.

Author:
Felix Project Team

Constructor Summary
EventHandlerProxy(org.apache.felix.eventadmin.impl.handler.EventHandlerTracker.HandlerContext context, org.osgi.framework.ServiceReference reference)
          Create an EventHandlerProxy.
 
Method Summary
 void blackListHandler()
          Blacklist the handler.
 boolean canDeliver(org.osgi.service.event.Event event)
          Check if this handler is allowed to receive the event - blacklisted - check filter - check permission
 void dispose()
          Dispose the proxy and release the handler
 java.lang.String[] getTopics()
          Get the topics of this handler.
 boolean isAsyncOrderedDelivery()
          Should async events be delivered in order?
 void sendEvent(org.osgi.service.event.Event event)
          Send the event.
 boolean update()
          Update the state with current properties from the service
 boolean useTimeout()
          Should a timeout be used for this handler?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventHandlerProxy

public EventHandlerProxy(org.apache.felix.eventadmin.impl.handler.EventHandlerTracker.HandlerContext context,
                         org.osgi.framework.ServiceReference reference)
Create an EventHandlerProxy.

Parameters:
context - The handler context
reference - Reference to the EventHandler
Method Detail

update

public boolean update()
Update the state with current properties from the service

Returns:
true if the handler configuration is valid.

dispose

public void dispose()
Dispose the proxy and release the handler


getTopics

public java.lang.String[] getTopics()
Get the topics of this handler. If this handler matches all topics null is returned


canDeliver

public boolean canDeliver(org.osgi.service.event.Event event)
Check if this handler is allowed to receive the event - blacklisted - check filter - check permission


useTimeout

public boolean useTimeout()
Should a timeout be used for this handler?


isAsyncOrderedDelivery

public boolean isAsyncOrderedDelivery()
Should async events be delivered in order?


sendEvent

public void sendEvent(org.osgi.service.event.Event event)
Send the event.


blackListHandler

public void blackListHandler()
Blacklist the handler.



Copyright © 2006-2012 The Apache Software Foundation. All Rights Reserved.