KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > api > factory > Factory


1 /***
2  * Fractal API
3  * Copyright (C) 2001-2002 France Telecom, INRIA
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: fractal@objectweb.org
20  *
21  * Authors: Eric Bruneton, Thierry Coupaye, Pascal Dechamboux, Romain Lenglet,
22  * Philippe Merle, Jean-Bernard Stefani.
23  */

24
25 package org.objectweb.fractal.api.factory;
26
27 import org.objectweb.fractal.api.Component;
28 import org.objectweb.fractal.api.Type;
29
30 /**
31  * A component interface to create components of the same type.
32  */

33
34 public interface Factory {
35
36   /**
37    * Returns the functional type of the components instantiated by this factory.
38    *
39    * @return the functional type of the components instantiated by this factory.
40    */

41
42   Type getFcInstanceType ();
43
44   /**
45    * Returns a description of the controller part of the components instantiated
46    * by this factory.
47    *
48    * @return a description of the controller part of the components instantiated
49    * by this factory. This description is implementation specific. If it
50    * is <tt>null</tt> then a "default" controller part will be used.
51    */

52
53   Object JavaDoc getFcControllerDesc ();
54
55   /**
56    * Returns a description of the content part of the components instantiated
57    * by this factory.
58    *
59    * @return a description of the content part of the components instantiated by
60    * this factory. This description is implementation specific. It may be
61    * <tt>null</tt> to create component with an empty initial content. It
62    * may also be, in Java, the fully qualified name of a Java class, to
63    * creat primitive components.
64    */

65
66   Object JavaDoc getFcContentDesc ();
67
68   /**
69    * Instantiates a component from this factory.
70    *
71    * @return the {@link Component} interface of the component instantiated from
72    * this factory.
73    * @throws InstantiationException if the component cannot be created.
74    */

75
76   Component newFcInstance () throws InstantiationException JavaDoc;
77 }
78
Popular Tags