Fractal | Fractal ADL | Cecilia Examples | Minus
 

fractal.api.Factory

package fractal.api;

/**
 * A component interface to create component instances.
 */
public interface Factory extends ErrorConst {

  /**
   * Create a new component.
   *
   * @param instance (out parameter) the created instance.
   * @return <code>0</code> if the new instance has been created correctly.
   *      {@link ErrorConst#INSTANTIATION_ERROR} if the instantiation fails.
   */
  int newFcInstance(out Component instance);
  
  /**
   * Destroy a previously created component.
   *
   * @param instance the component instance to destroy.
   * @return <code>0</code> if the new instance has been created correctly.
   *      {@link ErrorConst#ILLEGAL_LIFE_CYCLE} if the component has a
   *      {@link LifeCycleController} interface, but it is not in an appropriate
   *      state to perform this operation.
   *      {@link ErrorConst#INSTANTIATION_ERROR} if the destroy fails.
   */
  int destroyFcInstance(in Component instance);
}
 
2007-2009 © ObjectWeb Consortium  | Last Published: 2009-04-21 13:33  | Version: 2.1.0