View Javadoc

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.rmi.RemoteException;
21  import java.rmi.server.RMIClientSocketFactory;
22  import java.rmi.server.RMIServerSocketFactory;
23  
24  import jgroup.core.JgroupException;
25  import jgroup.core.registry.DependableRegistry;
26  import jgroup.core.registry.LookupRegistry;
27  import jgroup.core.registry.RegistryLocator;
28  
29  /**
30   * Registry Locator class used to retrieve a reference to reggie/greg.
31   * 
32   * @author Rohnny Moland
33   */
34  public final class GregRegistryLocator
35    implements RegistryLocator
36  {
37  
38    /* (non-Javadoc)
39     * @see jgroup.core.registry.RegistryLocator#getRegistry()
40     */
41    public DependableRegistry getRegistry() 
42      throws JgroupException, RemoteException
43    {
44      throw new UnsupportedOperationException();
45    }
46  
47    /* (non-Javadoc)
48     * @see jgroup.core.registry.RegistryLocator#getRegistry(java.rmi.server.RMIClientSocketFactory)
49     */
50    public DependableRegistry getRegistry(RMIClientSocketFactory csf) 
51      throws JgroupException, RemoteException
52    {
53      throw new UnsupportedOperationException();
54    }
55  
56    /* (non-Javadoc)
57     * @see jgroup.core.registry.RegistryLocator#createRegistry()
58     */
59    public DependableRegistry createRegistry() throws JgroupException, RemoteException
60    {
61      throw new UnsupportedOperationException();
62    }
63  
64    /* (non-Javadoc)
65     * @see jgroup.core.registry.RegistryLocator#createRegistry(java.rmi.server.RMIClientSocketFactory, 
66     * java.rmi.server.RMIServerSocketFactory)
67     */
68    public DependableRegistry createRegistry(RMIClientSocketFactory csf, RMIServerSocketFactory ssf) 
69      throws JgroupException, RemoteException
70    {
71      throw new UnsupportedOperationException();
72    }
73  
74    /* (non-Javadoc)
75     * @see jgroup.core.registry.RegistryLocator#getLookupRegistry()
76     */
77    public LookupRegistry getLookupRegistry() 
78    {    
79      GregRegistryImpl gri = new GregRegistryImpl();
80      return (LookupRegistry) gri;
81    }
82  
83  } // END GregRegistryLocator