org.apache.felix.ipojo.architecture
Class InstanceDescription

java.lang.Object
  extended by org.apache.felix.ipojo.architecture.InstanceDescription

public class InstanceDescription
extends java.lang.Object

Instance Description.

Author:
Felix Project Team

Constructor Summary
InstanceDescription(java.lang.String name, int state, long bundleId, ComponentTypeDescription desc)
          Constructor.
 
Method Summary
 void addHandler(HandlerDescription desc)
          Add an handler description to the list.
 void addInstance(InstanceDescription inst)
          Add an instance description to the contained instance list.
 long getBundleId()
          Get the bundle id of the bundle containing the described instance.
 ComponentTypeDescription getComponentDescription()
          Get the component type description of the described instance.
 InstanceDescription[] getContainedInstances()
          Get the list of contained instance in the describe instance.
 java.lang.String[] getCreatedObjects()
          Get the list of object created by the described instance.
 org.apache.felix.ipojo.metadata.Element getDescription()
          Get the instance description.
 HandlerDescription[] getHandlers()
          Get the plugged handler list.
 java.lang.String getName()
          Get the instance name.
 int getState()
          Get the state of the described instance.
 void setCreatedObjects(java.lang.String[] objects)
          Set the array of objects created by the described instance.
 void setState(int state)
          Set the state of the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceDescription

public InstanceDescription(java.lang.String name,
                           int state,
                           long bundleId,
                           ComponentTypeDescription desc)
Constructor.

Parameters:
name - : the name of the component instance.
state - : the state of the instance.
bundleId - : bundle id owning this instance.
desc - : the component type description of this instance.
Method Detail

getName

public java.lang.String getName()
Get the instance name.

Returns:
the name of the instance.

getCreatedObjects

public java.lang.String[] getCreatedObjects()
Get the list of object created by the described instance.

Returns:
the created instances

setCreatedObjects

public void setCreatedObjects(java.lang.String[] objects)
Set the array of objects created by the described instance.

Parameters:
objects - : the list of create objects.

getComponentDescription

public ComponentTypeDescription getComponentDescription()
Get the component type description of the described instance.

Returns:
: the component type description of this instance.

getHandlers

public HandlerDescription[] getHandlers()
Get the plugged handler list.

Returns:
the live handler list

addHandler

public void addHandler(HandlerDescription desc)
Add an handler description to the list.

Parameters:
desc - : the handler description to add

addInstance

public void addInstance(InstanceDescription inst)
Add an instance description to the contained instance list.

Parameters:
inst - : the handler description to add

setState

public void setState(int state)
Set the state of the component.

Parameters:
state - : the state

getState

public int getState()
Get the state of the described instance.

Returns:
the state of the instance.

getBundleId

public long getBundleId()
Get the bundle id of the bundle containing the described instance.

Returns:
the bundle id owning the component implementation class.

getContainedInstances

public InstanceDescription[] getContainedInstances()
Get the list of contained instance in the describe instance. This list contains only instances who exposed their architecture.

Returns:
the list of contained instances.

getDescription

public org.apache.felix.ipojo.metadata.Element getDescription()
Get the instance description.

Returns:
the instance description