org.apache.felix.ipojo
Class InstanceCreator

java.lang.Object
  extended by org.apache.felix.ipojo.InstanceCreator
All Implemented Interfaces:
FactoryStateListener

public class InstanceCreator
extends Object
implements FactoryStateListener

The instance creator creates instances and tracks their factories. It allows creating instances from external factories.

Author:
Felix Project Team

Constructor Summary
InstanceCreator(BundleContext context)
          Creates the instance creator.
 
Method Summary
 void addFactory(IPojoFactory factory)
          This method is called when a factory appears.
 void stateChanged(Factory factory, int newState)
          This method is called when the state of a factory changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceCreator

public InstanceCreator(BundleContext context)
Creates the instance creator. This object is generally a singleton.

Parameters:
context - the bundle context of the iPOJO bundle.
Method Detail

addFactory

public void addFactory(IPojoFactory factory)
This method is called when a factory appears.

Parameters:
factory - the new factory.

stateChanged

public void stateChanged(Factory factory,
                         int newState)
This method is called when the state of a factory changes.

Specified by:
stateChanged in interface FactoryStateListener
Parameters:
factory - the factory.
newState - the new state.
See Also:
FactoryStateListener.stateChanged(org.apache.felix.ipojo.Factory, int)


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.