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 * A binding between a client and a server interface. 28 */ 29 30 public interface Binding { 31 32 /** 33 * The {@link #getStatus status} flags corresponding to a valid binding. 34 */ 35 36 long OK = 0; 37 38 /** 39 * A {@link #getStatus status} flag indicating that the client interface and 40 * the server interface are not compatible. 41 */ 42 43 long INCOMPATIBLE_TYPE_INTERFACES = 1; 44 45 46 /** 47 * Returns the status of this binding. 48 * 49 * @return the status of this binding. 50 * @see #setStatus 51 */ 52 53 long getStatus (); 54 55 /** 56 * Sets the status of this binding. 57 * 58 * @param status the new status of this bindinge. 59 * @see #getStatus 60 */ 61 62 void setStatus (long status); 63 64 /** 65 * Returns the client interface that is bound by this binding. 66 * 67 * @return the client interface that is bound by this binding. 68 */ 69 70 ClientInterface getClientInterface (); 71 72 /** 73 * Returns the server interface that is bound by this binding. 74 * 75 * @return the server interface that is bound by this binding. 76 */ 77 78 ServerInterface getServerInterface (); 79 80 // TODO ajouter un status, le mettre a jour quand il faut 81 // (erreurs possibles: incompatible interface types, client and server 82 // components do not have a common parent...) 83 } 84