KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > gui > model > BasicClientInterface


1 /***
2  * FractalGUI: a graphical tool to edit Fractal component configurations.
3  * Copyright (C) 2003 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: fractal@objectweb.org
20  *
21  * Authors: Eric Bruneton, Patrice Fauvel
22  */

23
24 package org.objectweb.fractal.gui.model;
25
26 /**
27  * Basic implementation of the {@link ClientInterface} interface.
28  */

29
30 public class BasicClientInterface extends BasicInterface
31   implements ClientInterface
32 {
33
34   /**
35    * The binding corresponding to this client interface, or <tt>null</tt> if
36    * this interface is not bound.
37    */

38
39   private Binding binding;
40
41   /**
42    * Constructs a new external client interface.
43    *
44    * @param owner the component that will own this interface.
45    */

46
47   BasicClientInterface (final BasicComponent owner) {
48     super(owner);
49     complementaryItf = new BasicServerInterface(this);
50   }
51
52   /**
53    * Constructs a new internal client interface.
54    *
55    * @param externalItf the complementary interface of this interface.
56    */

57
58   BasicClientInterface (final ServerInterface externalItf) {
59     super(externalItf);
60   }
61
62   /**
63    * Constructs a new slave, collection client interface.
64    *
65    * @param rootCollectionItf a master collection client interface.
66    */

67
68   BasicClientInterface (final ClientInterface rootCollectionItf, final String JavaDoc suffix) {
69     super(rootCollectionItf, 0);
70     if (suffix != null) {
71       this.name = suffix;
72     }
73     complementaryItf = new BasicServerInterface(this);
74     ((BasicInterface)rootCollectionItf).addSlaveCollectionInterface(this);
75   }
76
77   public Binding getBinding () {
78     return binding;
79   }
80
81   /**
82    * Sets the binding that refer to this client inteface.
83    *
84    * @param binding the new binding that refer to this client inteface.
85    * @see #getBinding
86    */

87
88   void setBinding (final Binding binding) {
89     this.binding = binding;
90   }
91 }
92
Popular Tags