|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.ipojo.composite.CompositeManager
public class CompositeManager
iPOJO Composite manager. The composite manager class manages one instance of a component type which is a composition. It manages component lifecycle, and handlers...
Field Summary |
---|
Fields inherited from interface org.apache.felix.ipojo.ComponentInstance |
---|
DISPOSED, INVALID, STOPPED, VALID |
Constructor Summary | |
---|---|
CompositeManager(CompositeFactory factory,
org.osgi.framework.BundleContext context,
org.apache.felix.ipojo.HandlerManager[] handlers)
Construct a new Component Manager. |
Method Summary | |
---|---|
void |
addCompositeHandler(org.apache.felix.ipojo.HandlerManager handler)
Plug the given handler to the current container. |
void |
addInstanceStateListener(org.apache.felix.ipojo.InstanceStateListener listener)
Add an instance to the created instance list. |
void |
configure(org.apache.felix.ipojo.metadata.Element metadata,
java.util.Dictionary configuration)
Configure the instance manager. |
void |
dispose()
Dispose the instance. |
CompositeHandler |
getCompositeHandler(java.lang.String name)
Return a specified handler. |
org.osgi.framework.BundleContext |
getContext()
Get the bundle context used by this instance. |
org.apache.felix.ipojo.ComponentFactory |
getFactory()
Get the factory which create this instance. |
org.osgi.framework.BundleContext |
getGlobalContext()
Get the global bundle context. |
org.apache.felix.ipojo.architecture.InstanceDescription |
getInstanceDescription()
Return the instance description of this instance. |
java.lang.String |
getInstanceName()
Get the instance name. |
org.apache.felix.ipojo.ServiceContext |
getParentServiceContext()
Get the parent service context. |
CompositeHandler[] |
getRegistredCompositeHandlers()
REturn the list of handlers plugged on this instance. |
org.apache.felix.ipojo.ServiceContext |
getServiceContext()
Get the internal service context of this instance. |
int |
getState()
Get the actual state of the instance. |
boolean |
isStarted()
Check if the instance is started. |
protected void |
kill()
Kill the current instance. |
void |
reconfigure(java.util.Dictionary configuration)
Reconfigure the current instance. |
void |
removeInstanceStateListener(org.apache.felix.ipojo.InstanceStateListener listener)
Remove an instance state listener. |
void |
setState(int state)
Set the state of the component. |
void |
start()
Start the instance manager. |
void |
stateChanged(org.apache.felix.ipojo.ComponentInstance instance,
int newState)
State Change listener callback. |
void |
stop()
Stop the instance manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeManager(CompositeFactory factory, org.osgi.framework.BundleContext context, org.apache.felix.ipojo.HandlerManager[] handlers)
factory
- : the factory managing the instance managercontext
- : the bundle context to give to the instancehandlers
- : the handlers to plugMethod Detail |
---|
public void addCompositeHandler(org.apache.felix.ipojo.HandlerManager handler)
handler
- : the handler to plug.public void addInstanceStateListener(org.apache.felix.ipojo.InstanceStateListener listener)
addInstanceStateListener
in interface org.apache.felix.ipojo.ComponentInstance
listener
- : the instance state listener to add.ComponentInstance.addInstanceStateListener(org.apache.felix.ipojo.InstanceStateListener)
public void configure(org.apache.felix.ipojo.metadata.Element metadata, java.util.Dictionary configuration) throws org.apache.felix.ipojo.ConfigurationException
metadata
- : the component type metadataconfiguration
- : the configuration of the instance
org.apache.felix.ipojo.ConfigurationException
- : occurs when the component type are incorrect.public void dispose()
dispose
in interface org.apache.felix.ipojo.ComponentInstance
ComponentInstance.dispose()
public CompositeHandler getCompositeHandler(java.lang.String name)
name
- : class name of the handler to find
public org.osgi.framework.BundleContext getContext()
getContext
in interface org.apache.felix.ipojo.ComponentInstance
ComponentInstance.getContext()
public org.apache.felix.ipojo.ComponentFactory getFactory()
getFactory
in interface org.apache.felix.ipojo.ComponentInstance
ComponentInstance.getFactory()
public org.osgi.framework.BundleContext getGlobalContext()
public org.apache.felix.ipojo.architecture.InstanceDescription getInstanceDescription()
getInstanceDescription
in interface org.apache.felix.ipojo.ComponentInstance
ComponentInstance.getInstanceDescription()
public java.lang.String getInstanceName()
getInstanceName
in interface org.apache.felix.ipojo.ComponentInstance
ComponentInstance.getInstanceName()
public org.apache.felix.ipojo.ServiceContext getParentServiceContext()
public CompositeHandler[] getRegistredCompositeHandlers()
public org.apache.felix.ipojo.ServiceContext getServiceContext()
public int getState()
getState
in interface org.apache.felix.ipojo.ComponentInstance
ComponentInstance.getState()
public boolean isStarted()
isStarted
in interface org.apache.felix.ipojo.ComponentInstance
ComponentInstance.isStarted()
public void reconfigure(java.util.Dictionary configuration)
reconfigure
in interface org.apache.felix.ipojo.ComponentInstance
configuration
- : the new instance configuration.ComponentInstance.reconfigure(java.util.Dictionary)
public void removeInstanceStateListener(org.apache.felix.ipojo.InstanceStateListener listener)
removeInstanceStateListener
in interface org.apache.felix.ipojo.ComponentInstance
listener
- : the listener to removeComponentInstance.removeInstanceStateListener(org.apache.felix.ipojo.InstanceStateListener)
public void setState(int state)
state
- : new statepublic void start()
start
in interface org.apache.felix.ipojo.ComponentInstance
public void stateChanged(org.apache.felix.ipojo.ComponentInstance instance, int newState)
stateChanged
in interface org.apache.felix.ipojo.InstanceStateListener
instance
- : changing instancenewState
- : new stateInstanceStateListener.stateChanged(org.apache.felix.ipojo.ComponentInstance, int)
public void stop()
stop
in interface org.apache.felix.ipojo.ComponentInstance
protected void kill()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |