1. /*
  2. * @(#)RMIServer.java 1.19 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.management.remote.rmi;
  8. import java.io.IOException;
  9. import java.rmi.Remote;
  10. import java.rmi.RemoteException;
  11. /**
  12. * <p>RMI object used to establish connections to an RMI connector.
  13. * There is one Remote object implementing this interface for each RMI
  14. * connector.</p>
  15. *
  16. * <p>User code does not usually refer to this interface. It is
  17. * specified as part of the public API so that different
  18. * implementations of that API will interoperate.</p>
  19. *
  20. * @since 1.5
  21. * @since.unbundled 1.0
  22. */
  23. public interface RMIServer extends Remote {
  24. /**
  25. * <p>The version of the RMI Connector Protocol understood by this
  26. * connector server. This is a string with the following format:</p>
  27. *
  28. * <pre>
  29. * <em>protocol-version</em> <em>implementation-name</em>
  30. * </pre>
  31. *
  32. * <p>The <code><em>protocol-version</em></code> is a series of
  33. * two or more non-negative integers separated by periods
  34. * (<code>.</code>). An implementation of the version described
  35. * by this documentation must use the string <code>1.0</code>
  36. * here.</p>
  37. *
  38. * <p>After the protocol version there must be a space, followed
  39. * by the implementation name. The format of the implementation
  40. * name is unspecified. It is recommended that it include an
  41. * implementation version number. An implementation can use an
  42. * empty string as its implementation name, for example for
  43. * security reasons.</p>
  44. *
  45. * @return a string with the format described here.
  46. *
  47. * @exception RemoteException if there is a communication
  48. * exception during the remote method call.
  49. */
  50. public String getVersion() throws RemoteException;
  51. /**
  52. * <p>Makes a new connection through this RMI connector. Each
  53. * remote client calls this method to obtain a new RMI object
  54. * representing its connection.</p>
  55. *
  56. * @param credentials this object specifies the user-defined credentials
  57. * to be passed in to the server in order to authenticate the user before
  58. * creating the <code>RMIConnection</code>. Can be null.
  59. *
  60. * @return the newly-created connection object.
  61. *
  62. * @exception IOException if the new client object cannot be
  63. * created or exported, or if there is a communication exception
  64. * during the remote method call.
  65. *
  66. * @exception SecurityException if the given credentials do not
  67. * allow the server to authenticate the caller successfully.
  68. */
  69. public RMIConnection newClient(Object credentials) throws IOException;
  70. }