corba/src/java.corba/share/classes/org/omg/CORBA/ServerRequest.java
author chegar
Mon, 18 Aug 2014 10:07:13 +0100
changeset 26048 c6cdd019b5cb
parent 25862 a5e25d68f971
child 29827 aac4782e69ac
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
/*
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     2
 * Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
02bb8761fcce Initial load
duke
parents:
diff changeset
     4
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
02bb8761fcce Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    10
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
02bb8761fcce Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
02bb8761fcce Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
02bb8761fcce Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
02bb8761fcce Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
02bb8761fcce Initial load
duke
parents:
diff changeset
    16
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
02bb8761fcce Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
02bb8761fcce Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
02bb8761fcce Initial load
duke
parents:
diff changeset
    20
 *
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 4
diff changeset
    23
 * questions.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    24
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    25
02bb8761fcce Initial load
duke
parents:
diff changeset
    26
package org.omg.CORBA;
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
02bb8761fcce Initial load
duke
parents:
diff changeset
    28
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    29
 * An object that captures the explicit state of a request
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
 * for the Dynamic Skeleton Interface (DSI).  This class, the
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
 * cornerstone of the DSI, is analogous to the <code>Request</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
 * object in the DII.
02bb8761fcce Initial load
duke
parents:
diff changeset
    33
 * <P>
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
 * The ORB is responsible for creating this embodiment of a request,
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
 * and delivering it to a Dynamic Implementation Routine (DIR).
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
 * A dynamic servant (a DIR) is created by implementing the
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
 * <code>DynamicImplementation</code> class,
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
 * which has a single <code>invoke</code> method.  This method accepts a
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
 * <code>ServerRequest</code> object.
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
 * The abstract class <code>ServerRequest</code> defines
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
 * methods for accessing the
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
 * method name, the arguments and the context of the request, as
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
 * well as methods for setting the result of the request either as a
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
 * return value or an exception. <p>
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
 * A subtlety with accessing the arguments of the request is that the
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
 * DIR needs to provide type information about the
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
 * expected arguments, since there is no compiled information about
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
 * these. This information is provided through an <code>NVList</code>,
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
 * which is a list of <code>NamedValue</code> objects.
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
 * Each <code>NamedValue</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
 * contains an <code>Any</code> object, which in turn
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
 * has a <code>TypeCode</code> object representing the type
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
 * of the argument. <p>
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
 * Similarly, type information needs to be provided for the response,
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
 * for either the expected result or for an exception, so the methods
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
 * <code>result</code> and <code>except</code> take an <code>Any</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
 * object as a parameter. <p>
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
 * @see org.omg.CORBA.DynamicImplementation
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
 * @see org.omg.CORBA.NVList
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
 * @see org.omg.CORBA.NamedValue
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    66
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    67
02bb8761fcce Initial load
duke
parents:
diff changeset
    68
public abstract class ServerRequest {
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
     * Retrieves the name of the operation being
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
     * invoked. According to OMG IDL's rules, these names must be unique
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
     * among all operations supported by this object's "most-derived"
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
     * interface. Note that the operation names for getting and setting
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
     * attributes are <code>_get_&lt;attribute_name&gt;</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
     * and <code>_set_&lt;attribute_name&gt;</code>,
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
     * respectively.
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
     * @return     the name of the operation to be invoked
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
     * @deprecated use operation()
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
    @Deprecated
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
    public String op_name()
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
        return operation();
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
     * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception.
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
     * <P>
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
     * Retrieves the name of the operation being
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
     * invoked. According to OMG IDL's rules, these names must be unique
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
     * among all operations supported by this object's "most-derived"
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
     * interface. Note that the operation names for getting and setting
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
     * attributes are <code>_get_&lt;attribute_name&gt;</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
     * and <code>_set_&lt;attribute_name&gt;</code>,
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
     * respectively.
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
     * @return     the name of the operation to be invoked
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
     * @see <a href="package-summary.html#unimpl"><code>CORBA</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
     *      package comments for unimplemented features</a>
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
    public String operation()
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
        throw new org.omg.CORBA.NO_IMPLEMENT();
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
     * Specifies method parameter types and retrieves "in" and "inout"
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
     * argument values.
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
     * <P>
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
     * Note that this method is deprecated; use the method
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
     * <code>arguments</code> in its place.
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
     * <P>
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
     * Unless it calls the method <code>set_exception</code>,
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
     * the DIR must call this method exactly once, even if the
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
     * method signature contains no parameters. Once the method <code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
     * arguments</code> or <code>set_exception</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
     * has been called, calling <code>arguments</code> on the same
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
     * <code>ServerRequest</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
     * will result in a <code>BAD_INV_ORDER</code> system exception.
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
     * The DIR must pass in to the method <code>arguments</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
     * an NVList initialized with TypeCodes and Flags
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
     * describing the parameter types for the operation, in the order in which
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
     * they appear in the IDL specification (left to right). A
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
     * potentially-different NVList will be returned from
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
     * <code>arguments</code>, with the
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
     * "in" and "inout" argument values supplied. If it does not call
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
     * the method <code>set_exception</code>,
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
     * the DIR must supply the returned NVList with return
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
     * values for any "out" arguments before returning, and may also change
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
     * the return values for any "inout" arguments.
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
     * @param params            the arguments of the method, in the
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
     *                          form of an <code>NVList</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
     * @deprecated use the method <code>arguments</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
    @Deprecated
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
    public void params(NVList params)
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   143
        arguments(params);
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   145
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
     * Specifies method parameter types and retrieves "in" and "inout"
02bb8761fcce Initial load
duke
parents:
diff changeset
   148
     * argument values.
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
     * Unless it calls the method <code>set_exception</code>,
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
     * the DIR must call this method exactly once, even if the
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
     * method signature contains no parameters. Once the method <code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
     * arguments</code> or <code>set_exception</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
     * has been called, calling <code>arguments</code> on the same
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
     * <code>ServerRequest</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
     * will result in a <code>BAD_INV_ORDER</code> system exception.
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
     * The DIR must pass in to the method <code>arguments</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
     * an NVList initialized with TypeCodes and Flags
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
     * describing the parameter types for the operation, in the order in which
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
     * they appear in the IDL specification (left to right). A
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
     * potentially-different NVList will be returned from
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
     * <code>arguments</code>, with the
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
     * "in" and "inout" argument values supplied. If it does not call
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
     * the method <code>set_exception</code>,
02bb8761fcce Initial load
duke
parents:
diff changeset
   164
     * the DIR must supply the returned NVList with return
02bb8761fcce Initial load
duke
parents:
diff changeset
   165
     * values for any "out" arguments before returning, and it may also change
02bb8761fcce Initial load
duke
parents:
diff changeset
   166
     * the return values for any "inout" arguments.
02bb8761fcce Initial load
duke
parents:
diff changeset
   167
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
     * @param args              the arguments of the method, in the
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
     *                            form of an NVList
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
     * @see <a href="package-summary.html#unimpl"><code>CORBA</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   171
     *      package comments for unimplemented features</a>
02bb8761fcce Initial load
duke
parents:
diff changeset
   172
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   173
    public void arguments(org.omg.CORBA.NVList args) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
        throw new org.omg.CORBA.NO_IMPLEMENT();
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   176
02bb8761fcce Initial load
duke
parents:
diff changeset
   177
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
     * Specifies any return value for the call.
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
     * <P>
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
     * Note that this method is deprecated; use the method
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
     * <code>set_result</code> in its place.
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
     * <P>
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
     * Unless the method
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
     * <code>set_exception</code> is called, if the invoked method
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
     * has a non-void result type, the method <code>set_result</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
     * must be called exactly once before the DIR returns.
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
     * If the operation has a void result type, the method
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
     * <code>set_result</code> may optionally be
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
     * called once with an <code>Any</code> object whose type is
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
     * <code>tk_void</code>. Calling the method <code>set_result</code> before
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
     * the method <code>arguments</code> has been called or after
02bb8761fcce Initial load
duke
parents:
diff changeset
   194
     * the method <code>set_result</code> or <code>set_exception</code> has been
02bb8761fcce Initial load
duke
parents:
diff changeset
   195
     * called will result in a BAD_INV_ORDER exception. Calling the method
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
     * <code>set_result</code> without having previously called
02bb8761fcce Initial load
duke
parents:
diff changeset
   197
     * the method <code>ctx</code> when the IDL operation contains a
02bb8761fcce Initial load
duke
parents:
diff changeset
   198
     * context expression, or when the NVList passed to arguments did not
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
     * describe all parameters passed by the client, may result in a MARSHAL
02bb8761fcce Initial load
duke
parents:
diff changeset
   200
     * system exception.
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
     * @param any an <code>Any</code> object containing the return value to be set
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
     * @deprecated use the method <code>set_result</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   204
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   205
    @Deprecated
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
    public void result(Any any)
02bb8761fcce Initial load
duke
parents:
diff changeset
   207
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
        set_result(any);
02bb8761fcce Initial load
duke
parents:
diff changeset
   209
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
02bb8761fcce Initial load
duke
parents:
diff changeset
   211
02bb8761fcce Initial load
duke
parents:
diff changeset
   212
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   213
     * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception.
02bb8761fcce Initial load
duke
parents:
diff changeset
   214
     * <P>
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
     * Specifies any return value for the call. Unless the method
02bb8761fcce Initial load
duke
parents:
diff changeset
   216
     * <code>set_exception</code> is called, if the invoked method
02bb8761fcce Initial load
duke
parents:
diff changeset
   217
     * has a non-void result type, the method <code>set_result</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   218
     * must be called exactly once before the DIR returns.
02bb8761fcce Initial load
duke
parents:
diff changeset
   219
     * If the operation has a void result type, the method
02bb8761fcce Initial load
duke
parents:
diff changeset
   220
     * <code>set_result</code> may optionally be
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
     * called once with an <code>Any</code> object whose type is
02bb8761fcce Initial load
duke
parents:
diff changeset
   222
     * <code>tk_void</code>. Calling the method <code>set_result</code> before
02bb8761fcce Initial load
duke
parents:
diff changeset
   223
     * the method <code>arguments</code> has been called or after
02bb8761fcce Initial load
duke
parents:
diff changeset
   224
     * the method <code>set_result</code> or <code>set_exception</code> has been
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
     * called will result in a BAD_INV_ORDER exception. Calling the method
02bb8761fcce Initial load
duke
parents:
diff changeset
   226
     * <code>set_result</code> without having previously called
02bb8761fcce Initial load
duke
parents:
diff changeset
   227
     * the method <code>ctx</code> when the IDL operation contains a
02bb8761fcce Initial load
duke
parents:
diff changeset
   228
     * context expression, or when the NVList passed to arguments did not
02bb8761fcce Initial load
duke
parents:
diff changeset
   229
     * describe all parameters passed by the client, may result in a MARSHAL
02bb8761fcce Initial load
duke
parents:
diff changeset
   230
     * system exception.
02bb8761fcce Initial load
duke
parents:
diff changeset
   231
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   232
     * @param any an <code>Any</code> object containing the return value to be set
02bb8761fcce Initial load
duke
parents:
diff changeset
   233
     * @see <a href="package-summary.html#unimpl"><code>CORBA</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   234
     *      package comments for unimplemented features</a>
02bb8761fcce Initial load
duke
parents:
diff changeset
   235
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   236
    public void set_result(org.omg.CORBA.Any any)
02bb8761fcce Initial load
duke
parents:
diff changeset
   237
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   238
        throw new org.omg.CORBA.NO_IMPLEMENT();
02bb8761fcce Initial load
duke
parents:
diff changeset
   239
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   240
02bb8761fcce Initial load
duke
parents:
diff changeset
   241
02bb8761fcce Initial load
duke
parents:
diff changeset
   242
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   243
     * The DIR may call set_exception at any time to return an exception to the
02bb8761fcce Initial load
duke
parents:
diff changeset
   244
     * client. The Any passed to set_exception must contain either a system
02bb8761fcce Initial load
duke
parents:
diff changeset
   245
     * exception or a user exception specified in the raises expression
02bb8761fcce Initial load
duke
parents:
diff changeset
   246
     * of the invoked operation's IDL definition. Passing in an Any that does
02bb8761fcce Initial load
duke
parents:
diff changeset
   247
     * not
02bb8761fcce Initial load
duke
parents:
diff changeset
   248
     * contain an exception will result in a BAD_PARAM system exception. Passing
02bb8761fcce Initial load
duke
parents:
diff changeset
   249
     * in an unlisted user exception will result in either the DIR receiving a
02bb8761fcce Initial load
duke
parents:
diff changeset
   250
     * BAD_PARAM system exception or in the client receiving an
02bb8761fcce Initial load
duke
parents:
diff changeset
   251
     * UNKNOWN_EXCEPTION system exception.
02bb8761fcce Initial load
duke
parents:
diff changeset
   252
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   253
     * @param any       the <code>Any</code> object containing the exception
02bb8761fcce Initial load
duke
parents:
diff changeset
   254
     * @deprecated use set_exception()
02bb8761fcce Initial load
duke
parents:
diff changeset
   255
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   256
    @Deprecated
02bb8761fcce Initial load
duke
parents:
diff changeset
   257
    public void except(Any any)
02bb8761fcce Initial load
duke
parents:
diff changeset
   258
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   259
        set_exception(any);
02bb8761fcce Initial load
duke
parents:
diff changeset
   260
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   261
02bb8761fcce Initial load
duke
parents:
diff changeset
   262
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   263
     * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception.
02bb8761fcce Initial load
duke
parents:
diff changeset
   264
     * <P>
02bb8761fcce Initial load
duke
parents:
diff changeset
   265
     * Returns the given exception to the client.  This method
02bb8761fcce Initial load
duke
parents:
diff changeset
   266
     * is invoked by the DIR, which may call it at any time.
02bb8761fcce Initial load
duke
parents:
diff changeset
   267
     * The <code>Any</code> object  passed to this method must
02bb8761fcce Initial load
duke
parents:
diff changeset
   268
     * contain either a system
02bb8761fcce Initial load
duke
parents:
diff changeset
   269
     * exception or one of the user exceptions specified in the
02bb8761fcce Initial load
duke
parents:
diff changeset
   270
     * invoked operation's IDL definition. Passing in an
02bb8761fcce Initial load
duke
parents:
diff changeset
   271
     * <code>Any</code> object that does not contain an exception
02bb8761fcce Initial load
duke
parents:
diff changeset
   272
     * will cause a BAD_PARAM system exception to be thrown. Passing
02bb8761fcce Initial load
duke
parents:
diff changeset
   273
     * in an unlisted user exception will result in either the DIR receiving a
02bb8761fcce Initial load
duke
parents:
diff changeset
   274
     * BAD_PARAM system exception or in the client receiving an
02bb8761fcce Initial load
duke
parents:
diff changeset
   275
     * UNKNOWN_EXCEPTION system exception.
02bb8761fcce Initial load
duke
parents:
diff changeset
   276
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   277
     * @param any       the <code>Any</code> object containing the exception
02bb8761fcce Initial load
duke
parents:
diff changeset
   278
     * @exception BAD_PARAM if the given <code>Any</code> object does not
02bb8761fcce Initial load
duke
parents:
diff changeset
   279
     *                      contain an exception or the exception is an
02bb8761fcce Initial load
duke
parents:
diff changeset
   280
     *                      unlisted user exception
02bb8761fcce Initial load
duke
parents:
diff changeset
   281
     * @exception UNKNOWN_EXCEPTION if the given exception is an unlisted
02bb8761fcce Initial load
duke
parents:
diff changeset
   282
     *                              user exception and the DIR did not
02bb8761fcce Initial load
duke
parents:
diff changeset
   283
     *                              receive a BAD_PARAM exception
02bb8761fcce Initial load
duke
parents:
diff changeset
   284
     * @see <a href="package-summary.html#unimpl"><code>CORBA</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   285
     *      package comments for unimplemented features</a>
02bb8761fcce Initial load
duke
parents:
diff changeset
   286
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   287
    public void set_exception(Any any)
02bb8761fcce Initial load
duke
parents:
diff changeset
   288
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   289
        throw new org.omg.CORBA.NO_IMPLEMENT();
02bb8761fcce Initial load
duke
parents:
diff changeset
   290
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   291
02bb8761fcce Initial load
duke
parents:
diff changeset
   292
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   293
     * Returns the context information specified in IDL for the operation
02bb8761fcce Initial load
duke
parents:
diff changeset
   294
     * when the operation is not an attribute access and the operation's IDL
02bb8761fcce Initial load
duke
parents:
diff changeset
   295
     * definition contains a context expression; otherwise it returns
02bb8761fcce Initial load
duke
parents:
diff changeset
   296
     * a nil <code>Context</code> reference. Calling the method
02bb8761fcce Initial load
duke
parents:
diff changeset
   297
     * <code>ctx</code> before the method <code>arguments</code> has
02bb8761fcce Initial load
duke
parents:
diff changeset
   298
     * been called or after the method <code>ctx</code>,
02bb8761fcce Initial load
duke
parents:
diff changeset
   299
     * <code>set_result</code>, or <code>set_exception</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   300
     * has been called will result in a
02bb8761fcce Initial load
duke
parents:
diff changeset
   301
     * BAD_INV_ORDER system exception.
02bb8761fcce Initial load
duke
parents:
diff changeset
   302
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   303
     * @return                  the context object that is to be used
02bb8761fcce Initial load
duke
parents:
diff changeset
   304
     *                          to resolve any context strings whose
02bb8761fcce Initial load
duke
parents:
diff changeset
   305
     *                          values need to be sent with the invocation.
02bb8761fcce Initial load
duke
parents:
diff changeset
   306
     * @exception BAD_INV_ORDER if (1) the method <code>ctx</code> is called
02bb8761fcce Initial load
duke
parents:
diff changeset
   307
     *                          before the method <code>arguments</code> or
02bb8761fcce Initial load
duke
parents:
diff changeset
   308
     *                          (2) the method <code>ctx</code> is called
02bb8761fcce Initial load
duke
parents:
diff changeset
   309
     *                          after calling <code>set_result</code> or
02bb8761fcce Initial load
duke
parents:
diff changeset
   310
     *                          <code>set_exception</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   311
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   312
    public abstract Context ctx();
02bb8761fcce Initial load
duke
parents:
diff changeset
   313
02bb8761fcce Initial load
duke
parents:
diff changeset
   314
}