net.rmi.utils
Class RmiRegistryUtils

java.lang.Object
  extended by net.rmi.utils.RmiRegistryUtils

public final class RmiRegistryUtils
extends java.lang.Object

DocJava, Inc. http://www.docjava.com Programmer: dlyon Date: Oct 13, 2004 Time: 1:27:44 PM net.rmi.utils.RmiRegistryUtils Is a singleton pattern that lets you get the local registry.


Method Summary
static java.rmi.registry.Registry getRegistry()
          Restart the registry, if needed.
static void listNames()
           
static void main(java.lang.String[] args)
           
static void print(java.lang.Object[] o)
           
static void restart()
          Checks whether a Registry has been started on this host.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

listNames

public static void listNames()

print

public static void print(java.lang.Object[] o)

restart

public static void restart()
Checks whether a Registry has been started on this host. If not, it tries to start one. when it fails to start a Registry, it exits the program with exit code 1.


getRegistry

public static java.rmi.registry.Registry getRegistry()
Restart the registry, if needed. Return the only instance of the registry for consistent global by making use of the Singleton Design Pattern

Returns:
the internally held registry instance.

main

public static void main(java.lang.String[] args)