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.relacs.registry;
19
20 import java.io.IOException;
21 import java.rmi.AccessException;
22 import java.rmi.NotBoundException;
23 import java.rmi.Remote;
24 import java.rmi.RemoteException;
25
26 import jgroup.core.registry.LookupRegistry;
27 import jgroup.jini.LookupManager;
28
29 /**
30 * greg registry implementation.
31 *
32 * @author Rohnny Moland
33 */
34 public class GregRegistryImpl
35 implements LookupRegistry
36 {
37
38 public Remote lookup(String name)
39 throws RemoteException, NotBoundException, AccessException
40 {
41 try {
42 Remote proxy = (Remote) LookupManager.lookup(name);
43 return proxy;
44 } catch (IOException e) {
45 throw new RemoteException("Failed to retrieve a reference to the remote object");
46 }
47 }
48
49 public String[] list() throws RemoteException, AccessException
50 {
51 throw new UnsupportedOperationException("Not supported");
52 }
53 }
54