KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > julia > control > binding > ContentBindingController


1 /***
2  * Julia: France Telecom's implementation of the Fractal API
3  * Copyright (C) 2001-2002 France Telecom R&D
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: Eric.Bruneton@rd.francetelecom.com
20  *
21  * Author: Eric Bruneton
22  */

23
24 package org.objectweb.fractal.julia.control.binding;
25
26 import org.objectweb.fractal.api.NoSuchInterfaceException;
27 import org.objectweb.fractal.api.control.IllegalBindingException;
28 import org.objectweb.fractal.api.control.IllegalLifeCycleException;
29
30 /**
31  * A component interface to control the bindings of the content of container
32  * components. This interface is useful when a container and its encapsulated
33  * "user" component are merged into a single class. Indeed, in this case, the
34  * container class is generated as a sub class of the user component class, and
35  * may therefore override the binding management methods that may be provided by
36  * the user component (because both classes may implement the same {@link
37  * org.objectweb.fractal.api.control.BindingController} interface). In order to
38  * still be able to call the user component binding management methods from
39  * outside the component, four new methods are generated in the container class,
40  * that just calls the corresponding methods in the user component class (i.e.,
41  * in the super class) with the <tt>super</tt> keyword.
42  */

43
44 public interface ContentBindingController {
45
46   /**
47    * Calls the {@link
48    * org.objectweb.fractal.api.control.BindingController#listFc listFc}
49    * method on the component encapsulated in this container.
50    *
51    * @return the names of the client interfaces of the component to which this
52    * interface belongs.
53    */

54
55   String JavaDoc[] listFcContent ();
56
57   /**
58    * Calls the {@link
59    * org.objectweb.fractal.api.control.BindingController#lookupFc lookupFc}
60    * method on the component encapsulated in this container.
61    *
62    * @param clientItfName the name of a client interface of the component to
63    * which this interface belongs.
64    * @return the server interface to which the given interface is bound, or <tt>
65    * null</tt> if it is not bound.
66    * @throws NoSuchInterfaceException if the component to which this interface
67    * belongs does not have a client interface whose name is equal to the
68    * given name.
69    */

70
71   Object JavaDoc lookupFcContent (String JavaDoc clientItfName) throws NoSuchInterfaceException;
72
73   /**
74    * Calls the {@link
75    * org.objectweb.fractal.api.control.BindingController#bindFc bindFc} method
76    * on the component encapsulated in this container.
77    *
78    * @param clientItfName the name of a client interface of the component to
79    * which this interface belongs.
80    * @param serverItf a server interface.
81    * @throws NoSuchInterfaceException if there is no such client interface.
82    * @throws IllegalBindingException if the binding cannot be created.
83    * @throws IllegalLifeCycleException if this component has a {@link
84    * LifeCycleController} interface, but it is not in an appropriate state
85    * to perform this operation.
86    */

87
88   void bindFcContent (String JavaDoc clientItfName, Object JavaDoc serverItf) throws
89     NoSuchInterfaceException,
90     IllegalBindingException,
91     IllegalLifeCycleException;
92
93   /**
94    * Calls the {@link
95    * org.objectweb.fractal.api.control.BindingController#unbindFc unbindFc}
96    * method on the component encapsulated in this container.
97    *
98    * @param clientItfName the name of a client interface of the component to
99    * which this interface belongs.
100    * @throws NoSuchInterfaceException if there is no such client interface.
101    * @throws IllegalBindingException if the binding cannot be removed.
102    * @throws IllegalLifeCycleException if this component has a {@link
103    * LifeCycleController} interface, but it is not in an appropriate state
104    * to perform this operation.
105    */

106
107   void unbindFcContent (String JavaDoc clientItfName) throws
108     NoSuchInterfaceException,
109     IllegalBindingException,
110     IllegalLifeCycleException;
111 }
112
Popular Tags