KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > kilim > model > ComponentSlot


1 /**
2  * Copyright (C) 2002 Kelua SA
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19 package org.objectweb.kilim.model;
20
21 import java.util.Iterator JavaDoc;
22 import org.objectweb.kilim.KilimException;
23
24 /**
25  * @author horn
26  */

27     
28 public interface ComponentSlot extends ContainerElement {
29     /**
30      * retuns as an iterator the components plugged in the slot.
31      * @return Iterator
32      */

33     Iterator JavaDoc getPlugIns();
34     
35     /**
36      * binds each port defined in the slot to the port having the same name in the component (to be plugged).
37      * "Offered" ports in the slot are bound to "offered" interfaces in the component and the "required" ports in the component
38      * to the "required" ports in the slot.
39      * @param aComponent : the component to be plugged
40      * @throws KilimException : generated when aComponent is null or is already plugged in the slot.
41      */

42     void plug(Component aComponent) throws KilimException;
43     
44     /**
45      * unbinds each port defined in the slot from the port having the same name in the component (to be unplugged).
46      * @param aComponent : the component to be unplugged
47      * @throws KilimException :
48      */

49     void unplug(Component aComponent) throws KilimException;
50 }
Popular Tags