Path: blob/master/src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIServer.java
41162 views
/*1* Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.management.remote.rmi;2627import java.io.IOException;28import java.rmi.Remote;29import java.rmi.RemoteException;3031/**32* <p>RMI object used to establish connections to an RMI connector.33* There is one Remote object implementing this interface for each RMI34* connector.</p>35*36* <p>User code does not usually refer to this interface. It is37* specified as part of the public API so that different38* implementations of that API will interoperate.</p>39*40* @since 1.541*/42public interface RMIServer extends Remote {43/**44* <p>The version of the RMI Connector Protocol understood by this45* connector server. This is a string with the following format:</p>46*47* <pre>48* <em>protocol-version</em> <em>implementation-name</em>49* </pre>50*51* <p>The <code><em>protocol-version</em></code> is a series of52* two or more non-negative integers separated by periods53* (<code>.</code>). An implementation of the version described54* by this documentation must use the string <code>1.0</code>55* here.</p>56*57* <p>After the protocol version there must be a space, followed58* by the implementation name. The format of the implementation59* name is unspecified. It is recommended that it include an60* implementation version number. An implementation can use an61* empty string as its implementation name, for example for62* security reasons.</p>63*64* @return a string with the format described here.65*66* @exception RemoteException if there is a communication67* exception during the remote method call.68*/69public String getVersion() throws RemoteException;7071/**72* <p>Makes a new connection through this RMI connector. Each73* remote client calls this method to obtain a new RMI object74* representing its connection.</p>75*76* @param credentials this object specifies the user-defined credentials77* to be passed in to the server in order to authenticate the user before78* creating the <code>RMIConnection</code>. Can be null.79*80* @return the newly-created connection object.81*82* @exception IOException if the new client object cannot be83* created or exported, or if there is a communication exception84* during the remote method call.85*86* @exception SecurityException if the given credentials do not87* allow the server to authenticate the caller successfully.88*/89public RMIConnection newClient(Object credentials) throws IOException;90}919293