1. /*
  2. * @(#)RegistryHandler.java 1.12 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.rmi.registry;
  8. import java.rmi.RemoteException;
  9. import java.rmi.UnknownHostException;
  10. /**
  11. * <code>RegistryHandler</code> is an interface used internally by the RMI
  12. * runtime in previous implementation versions. It should never be accessed
  13. * by application code.
  14. *
  15. * @version 1.12, 01/23/03
  16. * @author Ann Wollrath
  17. * @since JDK1.1
  18. * @deprecated no replacement
  19. */
  20. public interface RegistryHandler {
  21. /**
  22. * Returns a "stub" for contacting a remote registry
  23. * on the specified host and port.
  24. *
  25. * @deprecated no replacement. As of the Java 2 platform v1.2, RMI no
  26. * longer uses the <code>RegistryHandler</code> to obtain the registry's
  27. * stub.
  28. * @param host name of remote registry host
  29. * @param port remote registry port
  30. * @return remote registry stub
  31. * @throws RemoteException if a remote error occurs
  32. * @throws UnknownHostException if unable to resolve given hostname
  33. */
  34. Registry registryStub(String host, int port)
  35. throws RemoteException, UnknownHostException;
  36. /**
  37. * Constructs and exports a Registry on the specified port.
  38. * The port must be non-zero.
  39. *
  40. * @deprecated no replacement. As of the Java 2 platform v1.2, RMI no
  41. * longer uses the <code>RegistryHandler</code> to obtain the registry's
  42. * implementation.
  43. * @param port port to export registry on
  44. * @return registry stub
  45. * @throws RemoteException if a remote error occurs
  46. */
  47. Registry registryImpl(int port) throws RemoteException;
  48. }