|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.ipojo.InstanceManager
org.apache.felix.ipojo.HandlerManager
public class HandlerManager
The handler manager manages an handler instance.
Field Summary |
---|
Fields inherited from class org.apache.felix.ipojo.InstanceManager |
---|
m_className, m_handlers, m_listeners, m_name, m_state |
Fields inherited from interface org.apache.felix.ipojo.ComponentInstance |
---|
DISPOSED, INVALID, STOPPED, VALID |
Constructor Summary | |
---|---|
HandlerManager(ComponentFactory factory,
BundleContext context,
HandlerManager[] handlers)
Creates a handler manager. |
Method Summary | |
---|---|
void |
dispose()
Disposes the instance. |
Handler |
getHandler()
Gets the contained handler object. |
void |
init(ComponentInstance instance,
Element metadata,
Dictionary configuration)
Creates and initializes the handler object. |
protected void |
kill()
Kills the current instance. |
void |
start()
Starts the instance manager. |
void |
stateChanged(ComponentInstance instance,
int newState)
State Change listener callback. |
void |
stop()
Stops the instance manager. |
Methods inherited from class org.apache.felix.ipojo.InstanceManager |
---|
addInstanceStateListener, configure, createPojoObject, deletePojoObject, getClassName, getClazz, getContext, getFactory, getFieldValue, getFieldValue, getGlobalContext, getHandler, getInstanceDescription, getInstanceName, getLocalServiceContext, getPojoObject, getPojoObjects, getRegistredFields, getRegistredHandlers, getRegistredMethods, getState, isStarted, onEntry, onError, onExit, onGet, onSet, reconfigure, register, register, register, removeInstanceStateListener, setState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HandlerManager(ComponentFactory factory, BundleContext context, HandlerManager[] handlers)
factory
- the handler factorycontext
- the bundle contexthandlers
- the handler arrayMethod Detail |
---|
public Handler getHandler()
public void init(ComponentInstance instance, Element metadata, Dictionary configuration) throws ConfigurationException
instance
- the component instance on which the handler will be attached.metadata
- the component metadata.configuration
- the instance configuration.
ConfigurationException
- if the handler configuration failed.public void start()
start
in interface ComponentInstance
start
in class InstanceManager
public void stop()
stop
in interface ComponentInstance
stop
in class InstanceManager
public void dispose()
dispose
in interface ComponentInstance
dispose
in class InstanceManager
ComponentInstance.dispose()
protected void kill()
public void stateChanged(ComponentInstance instance, int newState)
stateChanged
in interface InstanceStateListener
stateChanged
in class InstanceManager
instance
- the changing instancenewState
- the new stateInstanceStateListener.stateChanged(org.apache.felix.ipojo.ComponentInstance, int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |