src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIServer.java
author michaelm
Thu, 14 Nov 2019 10:16:28 +0000
branchunixdomainchannels
changeset 59076 998df1368cca
parent 47216 71c04702a3d5
permissions -rw-r--r--
unixdomainchannels: unix domain automatic bind
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.management.remote.rmi;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.io.IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.rmi.Remote;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.rmi.RemoteException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * <p>RMI object used to establish connections to an RMI connector.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * There is one Remote object implementing this interface for each RMI
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * connector.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * <p>User code does not usually refer to this interface.  It is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * specified as part of the public API so that different
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * implementations of that API will interoperate.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
public interface RMIServer extends Remote {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
     * <p>The version of the RMI Connector Protocol understood by this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
     * connector server.  This is a string with the following format:</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
     * <pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
     * <em>protocol-version</em> <em>implementation-name</em>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
     * </pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
     * <p>The <code><em>protocol-version</em></code> is a series of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
     * two or more non-negative integers separated by periods
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
     * (<code>.</code>).  An implementation of the version described
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
     * by this documentation must use the string <code>1.0</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
     * here.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
     * <p>After the protocol version there must be a space, followed
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
     * by the implementation name.  The format of the implementation
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
     * name is unspecified.  It is recommended that it include an
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
     * implementation version number.  An implementation can use an
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
     * empty string as its implementation name, for example for
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     * security reasons.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     * @return a string with the format described here.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     * @exception RemoteException if there is a communication
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     * exception during the remote method call.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    public String getVersion() throws RemoteException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
     * <p>Makes a new connection through this RMI connector.  Each
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     * remote client calls this method to obtain a new RMI object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     * representing its connection.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     * @param credentials this object specifies the user-defined credentials
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
     * to be passed in to the server in order to authenticate the user before
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     * creating the <code>RMIConnection</code>.  Can be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
     * @return the newly-created connection object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     * @exception IOException if the new client object cannot be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     * created or exported, or if there is a communication exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     * during the remote method call.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     * @exception SecurityException if the given credentials do not
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     * allow the server to authenticate the caller successfully.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    public RMIConnection newClient(Object credentials) throws IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
}