org.apache.felix.ipojo.handlers.event.publisher
Class EventAdminPublisherHandler

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.publisher.EventAdminPublisherHandler
All Implemented Interfaces:
FieldInterceptor, MethodInterceptor

public class EventAdminPublisherHandler
extends PrimitiveHandler

Event Publisher Handler.

Author:
Felix Project Team

Field Summary
static String NAMESPACE
          The handler Namespace.
static String TOPICS_PROPERTY
          The names of instance configuration properties.
 
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
EventAdminPublisherHandler()
           
 
Method Summary
 void configure(Element metadata, Dictionary conf)
          Constructor.
 EventAdmin getEventAdminService()
          This method is called by managed publishers to obtain the current EventAdmin service.
 void initializeComponentFactory(ComponentTypeDescription cd, Element metadata)
          Initializes the component type.
 Object onGet(Object pojo, String fieldName, Object value)
          Field interceptor callback.
 void start()
          Starts the handler instance.
 void stop()
          Stops the handler instance.
 
Methods inherited from class org.apache.felix.ipojo.PrimitiveHandler
attach, getFactory, getHandler, getInstanceManager, getLogger, getPojoMetadata, onCreation, onEntry, onError, onExit, onFinally, 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 names of instance configuration properties.

See Also:
Constant Field Values
Constructor Detail

EventAdminPublisherHandler

public EventAdminPublisherHandler()
Method Detail

initializeComponentFactory

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

Overrides:
initializeComponentFactory in class Handler
Parameters:
cd - the component type description to populate
metadata - the component type metadata
Throws:
ConfigurationException - if the given metadata is 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 component type metadata
conf - the instance configuration
Throws:
ConfigurationException - if one event publication 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()
Starts the handler instance. This method does nothing.

Specified by:
start in class Handler

stop

public void stop()
Stops the handler instance. This method does nothing.

Specified by:
stop in class Handler

onGet

public Object onGet(Object pojo,
                    String fieldName,
                    Object value)
Field interceptor callback. This method is called when the component attempt to one of its Publisher field.

Specified by:
onGet in interface FieldInterceptor
Overrides:
onGet in class PrimitiveHandler
Parameters:
pojo - the accessed field
fieldName - the name of the accessed field
value - the value of the field (useless here)
Returns:
the Publisher associated with the accessed field's name

getEventAdminService

public EventAdmin getEventAdminService()
This method is called by managed publishers to obtain the current EventAdmin service.

Returns:
the current EventAdmin service.


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.