org.apache.felix.ipojo.handlers.event.subscriber
Class EventAdminSubscriberHandler

java.lang.Object
  extended by org.apache.felix.ipojo.Handler
      extended by org.apache.felix.ipojo.PrimitiveHandler
          extended by org.apache.felix.ipojo.handlers.event.subscriber.EventAdminSubscriberHandler
All Implemented Interfaces:
ConstructorInjector, FieldInterceptor, MethodInterceptor, EventHandler

public class EventAdminSubscriberHandler
extends PrimitiveHandler
implements EventHandler

Event Subscriber Handler.

Author:
Felix Project Team

Field Summary
static String FILTER_PROPERTY
          The event's filter instance configuration property.
static String NAMESPACE
          The handler namespace.
static String TOPICS_PROPERTY
          The event's topics instance configuration property.
 
Fields inherited from class org.apache.felix.ipojo.PrimitiveHandler
HANDLER_TYPE
 
Fields inherited from class org.apache.felix.ipojo.Handler
HANDLER_LEVEL_PROPERTY, HANDLER_NAME_PROPERTY, HANDLER_NAMESPACE_PROPERTY, HANDLER_TYPE_PROPERTY, m_instance, m_isValid
 
Constructor Summary
EventAdminSubscriberHandler()
           
 
Method Summary
 void configure(Element metadata, Dictionary conf)
          Constructor.
 void handleEvent(Event event)
          Receives an event.
 void initializeComponentFactory(ComponentTypeDescription cd, Element metadata)
          Initializes the component type.
 void start()
          Handler start method.
 void stop()
          Handler stop method.
 
Methods inherited from class org.apache.felix.ipojo.PrimitiveHandler
attach, getConstructorParameter, getConstructorParameterType, getFactory, getHandler, getInstanceManager, getLogger, getPojoMetadata, onCreation, onEntry, onError, onExit, onFinally, onGet, onSet, setFactory
 
Methods inherited from class org.apache.felix.ipojo.Handler
debug, error, error, getDescription, getHandlerManager, getValidity, info, isValid, reconfigure, setValidity, stateChanged, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE

public static final String NAMESPACE
The handler namespace.

See Also:
Constant Field Values

TOPICS_PROPERTY

public static final String TOPICS_PROPERTY
The event's topics instance configuration property.

See Also:
Constant Field Values

FILTER_PROPERTY

public static final String FILTER_PROPERTY
The event's filter instance configuration property.

See Also:
Constant Field Values
Constructor Detail

EventAdminSubscriberHandler

public EventAdminSubscriberHandler()
Method Detail

initializeComponentFactory

public void initializeComponentFactory(ComponentTypeDescription cd,
                                       Element metadata)
                                throws ConfigurationException
Initializes the component type.

Overrides:
initializeComponentFactory in class Handler
Parameters:
cd - component type description to populate.
metadata - component type metadata.
Throws:
ConfigurationException - if the metadata are incorrect.
See Also:
org.apache.felix.ipojo.Handler#initializeComponentFactory(org.apache.felix.ipojo.architecture.ComponentDescription, org.apache.felix.ipojo.metadata.Element)

configure

public void configure(Element metadata,
                      Dictionary conf)
               throws ConfigurationException
Constructor.

Specified by:
configure in class Handler
Parameters:
metadata - the omponent type metadata
conf - the instance configuration
Throws:
ConfigurationException - if one event subscription is not correct
See Also:
org.apache.felix.ipojo.Handler#configure(org.apache.felix.ipojo.InstanceManager, org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)

start

public void start()
Handler start method.

Specified by:
start in class Handler
See Also:
Handler.start()

stop

public void stop()
Handler stop method.

Specified by:
stop in class Handler
See Also:
Handler.stop()

handleEvent

public void handleEvent(Event event)
Receives an event. The event is dispatch to attached subscribers.

Specified by:
handleEvent in interface EventHandler
Parameters:
event - the received event.
See Also:
EventHandler.handleEvent(org.osgi.service.event.Event)


Copyright © 2011 Apache Software Foundation. All Rights Reserved.