KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > api > type > InterfaceType


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.type;
26
27 import org.objectweb.fractal.api.Type;
28
29 /**
30  * A component interface type. Such a type is made of a name, which is the name
31  * of the interface described by this type inside its component (see {@link
32  * org.objectweb.fractal.api.Interface#getFcItfName getFcItfName}), a list of
33  * method signatures, which describes the methods provided or required by this
34  * interface, and various flags that indicates if this interface is provided or
35  * required, mandatory or not...
36  */

37
38 public interface InterfaceType extends Type {
39
40   /**
41    * Returns the name of component interfaces of this type. More precisely,
42    * because some interfaces can be created dynamically (see {@link
43    * #isFcCollectionItf isFcCollectionItf}), this name is in fact a
44    * <i>prefix</i> of the real names of interfaces of this type.
45    *
46    * @return the name of component interfaces of this type inside their
47    * components (see {@link
48    * org.objectweb.fractal.api.Interface#getFcItfName getFcItfName}).
49    */

50
51   String JavaDoc getFcItfName ();
52
53   /**
54    * Returns the signatures of the methods of interfaces of this type. In Java
55    * this method returns the fully qualified name of a Java interface
56    * corresponding to these method signatures.
57    *
58    * @return the signatures of the methods of interfaces of this type.
59    */

60
61   String JavaDoc getFcItfSignature ();
62
63   /**
64    * Returns <tt>true</tt> if component interfaces of this type are client
65    * interfaces.
66    *
67    * @return <tt>true</tt> if component interfaces of this type are client
68    * interfaces, i.e., interfaces that are required, or <tt>false</tt> if
69    * they are server interfaces, i.e., interfaces that are provided.
70    */

71
72   boolean isFcClientItf ();
73
74   /**
75    * Returns <tt>true</tt> if component interfaces of this type are optional. A
76    * mandatory interface is guaranteed to be "available" when the component
77    * is started. For a client interface, this means that the interface is bound,
78    * and that it is bound to a mandatory interface. An optional interface may
79    * not be available when the component is started (for a client interface, it
80    * means that the interface may not be bound).
81    *
82    * @return <tt>true</tt> if component interfaces of this type are optional.
83    */

84
85   boolean isFcOptionalItf ();
86
87   /**
88    * Indicates how many interfaces of this type a component may have. A
89    * singleton interface type means that a component must have exactly one
90    * interface of this type. A collection interface type means that a component
91    * may have an arbitrary number of interfaces of this type (whose names must
92    * all begin with the name specified in this interface type).
93    *
94    * @return <tt>false</tt> if this type is a singleton interface type.
95    */

96
97   boolean isFcCollectionItf ();
98 }
99
Popular Tags