1 /* 2 * Copyright (c) 1998-2005 The Jgroup Team. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU Lesser General Public License for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public License 14 * along with this program; if not, write to the Free Software 15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * 17 */ 18 package jgroup.core.registry; 19 20 import java.rmi.AccessException; 21 import java.rmi.NotBoundException; 22 import java.rmi.Remote; 23 import java.rmi.RemoteException; 24 25 import jgroup.core.ExternalGMIListener; 26 27 /** 28 * Interface used by clients to lookup proxy in 29 * registry. 30 * 31 * @author Rohnny Moland 32 */ 33 public interface LookupRegistry 34 extends ExternalGMIListener 35 { 36 /** 37 * Returns a proxy for the remote object group associated with the specified name in the 38 * registry. When LeaseLayer is used, it checks to see if any servers have expired 39 * leasetimes. 40 * 41 * @param name the name associated with the remote object group 42 * @return a proxy for the remote object group 43 * 44 * @exception RemoteException If remote operation failed. 45 * @exception NotBoundException if there is no object group with this name in the 46 * registry. 47 * @exception AccessException If this operation is not permitted. 48 */ 49 public Remote lookup(String name) 50 throws RemoteException, NotBoundException, AccessException; 51 52 /** 53 * Returns an array containing the remote object group names registered in the 54 * registry. When LeaseLayer is used, it checks to see if any servers have expired 55 * leasetimes. 56 * 57 * @exception RemoteException If remote operation failed. 58 * @exception AccessException If this operation is not permitted. 59 */ 60 public String[] list() 61 throws RemoteException, AccessException; 62 63 } // END LookupRegistry 64