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