src/java.rmi/share/classes/java/rmi/server/RemoteCall.java
author serb
Thu, 12 Sep 2019 22:20:35 -0700
changeset 58323 7b3101216e61
parent 47216 71c04702a3d5
permissions -rw-r--r--
8225101: Crash at sun.awt.X11.XlibWrapper.XkbGetUpdatedMap when change keybord map Reviewed-by: prr, pbansal
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) 1996, 2006, 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 java.rmi.server;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
import java.rmi.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.io.ObjectOutput;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.io.ObjectInput;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.io.StreamCorruptedException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.io.IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * <code>RemoteCall</code> is an abstraction used solely by the RMI runtime
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * (in conjunction with stubs and skeletons of remote objects) to carry out a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * call to a remote object.  The <code>RemoteCall</code> interface is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * deprecated because it is only used by deprecated methods of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * <code>java.rmi.server.RemoteRef</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 *
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 5506
diff changeset
    40
 * @since   1.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * @author  Ann Wollrath
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * @author  Roger Riggs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * @see     java.rmi.server.RemoteRef
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * @deprecated no replacement.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
@Deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
public interface RemoteCall {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
     * Return the output stream the stub/skeleton should put arguments/results
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
     * into.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
     * @return output stream for arguments/results
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
     * @exception java.io.IOException if an I/O error occurs.
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 5506
diff changeset
    55
     * @since 1.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
     * @deprecated no replacement
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    @Deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    ObjectOutput getOutputStream()  throws IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
     * Release the output stream; in some transports this would release
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     * the stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     * @exception java.io.IOException if an I/O error occurs.
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 5506
diff changeset
    66
     * @since 1.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     * @deprecated no replacement
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
    @Deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    void releaseOutputStream()  throws IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
     * Get the InputStream that the stub/skeleton should get
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     * results/arguments from.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     * @return input stream for reading arguments/results
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     * @exception java.io.IOException if an I/O error occurs.
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 5506
diff changeset
    78
     * @since 1.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     * @deprecated no replacement
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    @Deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    ObjectInput getInputStream()  throws IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     * Release the input stream. This would allow some transports to release
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     * the channel early.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     * @exception java.io.IOException if an I/O error occurs.
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 5506
diff changeset
    90
     * @since 1.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     * @deprecated no replacement
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    @Deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    void releaseInputStream() throws IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     * Returns an output stream (may put out header information
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     * relating to the success of the call). Should only succeed
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
     * once per remote call.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     * @param success If true, indicates normal return, else indicates
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * exceptional return.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * @return output stream for writing call result
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     * @exception java.io.IOException              if an I/O error occurs.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
     * @exception java.io.StreamCorruptedException If already been called.
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 5506
diff changeset
   106
     * @since 1.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     * @deprecated no replacement
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
    @Deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    ObjectOutput getResultStream(boolean success) throws IOException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        StreamCorruptedException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     * Do whatever it takes to execute the call.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
     * @exception java.lang.Exception if a general exception occurs.
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 5506
diff changeset
   117
     * @since 1.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * @deprecated no replacement
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    @Deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    void executeCall() throws Exception;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
     * Allow cleanup after the remote call has completed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
     * @exception java.io.IOException if an I/O error occurs.
24865
09b1d992ca72 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents: 5506
diff changeset
   127
     * @since 1.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     * @deprecated no replacement
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    @Deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    void done() throws IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
}