org.apache.felix.ipojo.handlers.lifecycle.callback
Class LifecycleCallbackHandler

java.lang.Object
  extended by org.apache.felix.ipojo.Handler
      extended by org.apache.felix.ipojo.PrimitiveHandler
          extended by org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler
All Implemented Interfaces:
ConstructorInjector, FieldInterceptor, MethodInterceptor

public class LifecycleCallbackHandler
extends PrimitiveHandler

Lifecycle callback handler.

Author:
Felix Project Team

Field Summary
 
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
LifecycleCallbackHandler()
           
 
Method Summary
 void configure(Element metadata, Dictionary configuration)
          Configure the handler.
 void start()
          Start the handler.
 void stateChanged(int state)
          When the state change call the associated callback.
 void stop()
          Stop the handler.
 
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, initializeComponentFactory, isValid, reconfigure, setValidity, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifecycleCallbackHandler

public LifecycleCallbackHandler()
Method Detail

configure

public void configure(Element metadata,
                      Dictionary configuration)
               throws ConfigurationException
Configure the handler.

Specified by:
configure in class Handler
Parameters:
metadata - : the component type metadata
configuration - : the instance configuration
Throws:
ConfigurationException - : one callback metadata is not correct (either the transition or the method are 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()
Start the handler.

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

stop

public void stop()
Stop the handler.

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

stateChanged

public void stateChanged(int state)
When the state change call the associated callback.

Overrides:
stateChanged in class Handler
Parameters:
state - : the new instance state.
See Also:
Handler.stateChanged(int)


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.