public class InstanceDescription extends java.lang.Object implements InstanceStateListener
Modifier and Type | Field and Description |
---|---|
protected HandlerDescription[] |
m_handlers
The list of handlers plugged on the component instance.
|
protected ComponentInstance |
m_instance
The Underlying component instance.
|
protected ComponentTypeDescription |
m_type
Component Type of the instance.
|
Constructor and Description |
---|
InstanceDescription(ComponentTypeDescription desc,
ComponentInstance ci)
Creates the instance description.
|
Modifier and Type | Method and Description |
---|---|
void |
addHandler(HandlerDescription desc)
Adds an handler description to the list.
|
long |
getBundleId()
Gets the bundle id of the bundle containing the component type of the instance.
|
ComponentTypeDescription |
getComponentDescription()
Gets the component type description of the described instance.
|
org.apache.felix.ipojo.metadata.Element |
getDescription()
Gets the instance description.
|
HandlerDescription |
getHandlerDescription(java.lang.String handler)
Gets a handler description by specifying the handler qualified name.
|
HandlerDescription[] |
getHandlers()
Gets the plugged handler list.
|
ComponentInstance |
getInstance()
Gets the underlying component instance
|
java.lang.String |
getName()
Gets the instance name.
|
int |
getState()
Gets the state of the described instance.
|
void |
stateChanged(ComponentInstance instance,
int newState)
The underlying instance state changes.
|
protected HandlerDescription[] m_handlers
protected final ComponentInstance m_instance
protected final ComponentTypeDescription m_type
public InstanceDescription(ComponentTypeDescription desc, ComponentInstance ci)
ci
- the state of the instance.desc
- the component type description of this instance.public ComponentInstance getInstance()
public java.lang.String getName()
public ComponentTypeDescription getComponentDescription()
public HandlerDescription[] getHandlers()
public void addHandler(HandlerDescription desc)
desc
- : the handler description to addpublic HandlerDescription getHandlerDescription(java.lang.String handler)
handler
- the handler namenull
if not foundpublic int getState()
public long getBundleId()
public org.apache.felix.ipojo.metadata.Element getDescription()
public void stateChanged(ComponentInstance instance, int newState)
stateChanged
in interface InstanceStateListener
instance
- the instancenewState
- the new stateInstanceStateListener.stateChanged(org.apache.felix.ipojo.ComponentInstance, int)
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.