corba/src/share/classes/org/omg/CORBA/portable/ObjectImpl.java
author ohair
Tue, 25 May 2010 15:52:11 -0700
changeset 5555 b2b5ed3f0d0d
parent 4 02bb8761fcce
permissions -rw-r--r--
6943119: Rebrand source copyright notices Reviewed-by: darcy
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) 1997, 2006, 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
package org.omg.CORBA.portable;
02bb8761fcce Initial load
duke
parents:
diff changeset
    26
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
import org.omg.CORBA.Request;
02bb8761fcce Initial load
duke
parents:
diff changeset
    28
import org.omg.CORBA.NamedValue;
02bb8761fcce Initial load
duke
parents:
diff changeset
    29
import org.omg.CORBA.NVList;
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
import org.omg.CORBA.ExceptionList;
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
import org.omg.CORBA.ContextList;
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
import org.omg.CORBA.Context;
02bb8761fcce Initial load
duke
parents:
diff changeset
    33
import org.omg.CORBA.TypeCode;
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
import org.omg.CORBA.BAD_OPERATION;
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
import org.omg.CORBA.SystemException;
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
/**
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
 *  The common base class for all stub classes; provides default implementations
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
 *  of the <code>org.omg.CORBA.Object</code> methods. All method implementations are
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
 *  forwarded to a <code>Delegate</code> object stored in the <code>ObjectImpl</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
 *  instance.  <code>ObjectImpl</code> allows for portable stubs because the
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
 *  <code>Delegate</code> can be implemented by a different vendor-specific ORB.
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
abstract public class ObjectImpl implements org.omg.CORBA.Object
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
{
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
     * The field that stores the <code>Delegate</code> instance for
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
     * this <code>ObjectImpl</code> object. This <code>Delegate</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
     * instance can be implemented by a vendor-specific ORB.  Stub classes,
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
     * which are derived from this <code>ObjectImpl</code> class, can be
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
     * portable because they delegate all of the methods called on them to this
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
     * <code>Delegate</code> object.
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
    private transient Delegate __delegate;
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
     * Retrieves the reference to the vendor-specific <code>Delegate</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
     * object to which this <code>ObjectImpl</code> object delegates all
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
     * methods invoked on it.
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
     * @return the Delegate contained in this ObjectImpl instance
02bb8761fcce Initial load
duke
parents:
diff changeset
    66
     * @throws BAD_OPERATION if the delegate has not been set
02bb8761fcce Initial load
duke
parents:
diff changeset
    67
     * @see #_set_delegate
02bb8761fcce Initial load
duke
parents:
diff changeset
    68
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
    public Delegate _get_delegate() {
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
        if (__delegate == null)
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
            throw new BAD_OPERATION("The delegate has not been set!");
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
        return __delegate;
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
     * Sets the Delegate for this <code>ObjectImpl</code> instance to the given
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
     * <code>Delegate</code> object.  All method invocations on this
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
     * <code>ObjectImpl</code> object will be forwarded to this delegate.
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
     * @param delegate the <code>Delegate</code> instance to which
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
     *        all method calls on this <code>ObjectImpl</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
     *        will be delegated; may be implemented by a third-party ORB
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
     * @see #_get_delegate
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
    public void _set_delegate(Delegate delegate) {
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
        __delegate = delegate;
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
     * Retrieves a string array containing the repository identifiers
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
     * supported by this <code>ObjectImpl</code> object.  For example,
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
     * for a stub, this method returns information about all the
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
     * interfaces supported by the stub.
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
     * @return the array of all repository identifiers supported by this
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
     *         <code>ObjectImpl</code> instance
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
    public abstract String[] _ids();
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
     * Returns a duplicate of this <code>ObjectImpl</code> object.
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
     * @return an <code>orb.omg.CORBA.Object</code> object that is
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
     *         a duplicate of this object
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
    public org.omg.CORBA.Object _duplicate() {
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
        return _get_delegate().duplicate(this);
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
     * Releases the resources associated with this <code>ObjectImpl</code> object.
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
    public void _release() {
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
        _get_delegate().release(this);
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
     * Checks whether the object identified by the given repository
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
     * identifier is an <code>ObjectImpl</code> object.
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
     * @param repository_id a <code>String</code> object with the repository
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
     *        identifier to check
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
     * @return <code>true</code> if the object identified by the given
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
     *         repository id is an instance of <code>ObjectImpl</code>;
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
     *         <code>false</code> otherwise
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
    public boolean _is_a(String repository_id) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
        return _get_delegate().is_a(this, repository_id);
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
     * Checks whether the the given <code>ObjectImpl</code> object is
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
     * equivalent to this <code>ObjectImpl</code> object.
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
     * @param that an instance of <code>ObjectImpl</code> to compare with
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
     *        this <code>ObjectImpl</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
     * @return <code>true</code> if the given object is equivalent
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
     *         to this <code>ObjectImpl</code> object;
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
     *         <code>false</code> otherwise
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   143
    public boolean _is_equivalent(org.omg.CORBA.Object that) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
        return _get_delegate().is_equivalent(this, that);
02bb8761fcce Initial load
duke
parents:
diff changeset
   145
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   148
     * Checks whether the server object for this <code>ObjectImpl</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
     * object has been destroyed.
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
     * @return <code>true</code> if the ORB knows authoritatively that the
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
     *         server object does not exist; <code>false</code> otherwise
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
    public boolean _non_existent() {
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
        return _get_delegate().non_existent(this);
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
     * Retrieves the hash code that serves as an ORB-internal identifier for
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
     * this <code>ObjectImpl</code> object.
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
     * @param maximum an <code>int</code> indicating the upper bound on the hash
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
     *        value returned by the ORB
02bb8761fcce Initial load
duke
parents:
diff changeset
   164
     * @return an <code>int</code> representing the hash code for this
02bb8761fcce Initial load
duke
parents:
diff changeset
   165
     *         <code>ObjectImpl</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
   166
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   167
    public int _hash(int maximum) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
        return _get_delegate().hash(this, maximum);
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
02bb8761fcce Initial load
duke
parents:
diff changeset
   171
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   172
     * Creates a <code>Request</code> object containing the given method
02bb8761fcce Initial load
duke
parents:
diff changeset
   173
     * that can be used with the Dynamic Invocation Interface.
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
     * @param operation the method to be invoked by the new <code>Request</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   176
     *        object
02bb8761fcce Initial load
duke
parents:
diff changeset
   177
     * @return a new <code>Request</code> object initialized with the
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
     *         given method
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
    public Request _request(String operation) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
        return _get_delegate().request(this, operation);
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
     * Creates a <code>Request</code> object that contains the given context,
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
     * method, argument list, and container for the result.
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
     * @param ctx the Context for the request
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
     * @param operation the method that the new <code>Request</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
     *        object will invoke
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
     * @param arg_list the arguments for the method; an <code>NVList</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
     *        in which each argument is a <code>NamedValue</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
     * @param result a <code>NamedValue</code> object to be used for
02bb8761fcce Initial load
duke
parents:
diff changeset
   194
     *        returning the result of executing the request's method
02bb8761fcce Initial load
duke
parents:
diff changeset
   195
     * @return a new <code>Request</code> object initialized with the
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
     *         given context, method, argument list, and container for the
02bb8761fcce Initial load
duke
parents:
diff changeset
   197
     *         return value
02bb8761fcce Initial load
duke
parents:
diff changeset
   198
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
    public Request _create_request(Context ctx,
02bb8761fcce Initial load
duke
parents:
diff changeset
   200
                                   String operation,
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
                                   NVList arg_list,
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
                                   NamedValue result) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
        return _get_delegate().create_request(this,
02bb8761fcce Initial load
duke
parents:
diff changeset
   204
                                              ctx,
02bb8761fcce Initial load
duke
parents:
diff changeset
   205
                                              operation,
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
                                              arg_list,
02bb8761fcce Initial load
duke
parents:
diff changeset
   207
                                              result);
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   209
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   211
     * Creates a <code>Request</code> object that contains the given context,
02bb8761fcce Initial load
duke
parents:
diff changeset
   212
     * method, argument list, container for the result, exceptions, and
02bb8761fcce Initial load
duke
parents:
diff changeset
   213
     * list of property names to be used in resolving the context strings.
02bb8761fcce Initial load
duke
parents:
diff changeset
   214
     * This <code>Request</code> object is for use in the Dynamic
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
     * Invocation Interface.
02bb8761fcce Initial load
duke
parents:
diff changeset
   216
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   217
     * @param ctx the <code>Context</code> object that contains the
02bb8761fcce Initial load
duke
parents:
diff changeset
   218
     *        context strings that must be resolved before they are
02bb8761fcce Initial load
duke
parents:
diff changeset
   219
     *        sent along with the request
02bb8761fcce Initial load
duke
parents:
diff changeset
   220
     * @param operation the method that the new <code>Request</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
     *        object will invoke
02bb8761fcce Initial load
duke
parents:
diff changeset
   222
     * @param arg_list the arguments for the method; an <code>NVList</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   223
     *        in which each argument is a <code>NamedValue</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
   224
     * @param result a <code>NamedValue</code> object to be used for
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
     *        returning the result of executing the request's method
02bb8761fcce Initial load
duke
parents:
diff changeset
   226
     * @param exceptions a list of the exceptions that the given method
02bb8761fcce Initial load
duke
parents:
diff changeset
   227
     *        throws
02bb8761fcce Initial load
duke
parents:
diff changeset
   228
     * @param contexts a list of the properties that are needed to
02bb8761fcce Initial load
duke
parents:
diff changeset
   229
     *        resolve the contexts in <i>ctx</i>; the strings in
02bb8761fcce Initial load
duke
parents:
diff changeset
   230
     *        <i>contexts</i> are used as arguments to the method
02bb8761fcce Initial load
duke
parents:
diff changeset
   231
     *        <code>Context.get_values</code>,
02bb8761fcce Initial load
duke
parents:
diff changeset
   232
     *        which returns the value associated with the given property
02bb8761fcce Initial load
duke
parents:
diff changeset
   233
     * @return a new <code>Request</code> object initialized with the
02bb8761fcce Initial load
duke
parents:
diff changeset
   234
     *         given context strings to resolve, method, argument list,
02bb8761fcce Initial load
duke
parents:
diff changeset
   235
     *         container for the result, exceptions, and list of property
02bb8761fcce Initial load
duke
parents:
diff changeset
   236
     *         names to be used in resolving the context strings
02bb8761fcce Initial load
duke
parents:
diff changeset
   237
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   238
    public Request _create_request(Context ctx,
02bb8761fcce Initial load
duke
parents:
diff changeset
   239
                                   String operation,
02bb8761fcce Initial load
duke
parents:
diff changeset
   240
                                   NVList arg_list,
02bb8761fcce Initial load
duke
parents:
diff changeset
   241
                                   NamedValue result,
02bb8761fcce Initial load
duke
parents:
diff changeset
   242
                                   ExceptionList exceptions,
02bb8761fcce Initial load
duke
parents:
diff changeset
   243
                                   ContextList contexts) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   244
        return _get_delegate().create_request(this,
02bb8761fcce Initial load
duke
parents:
diff changeset
   245
                                              ctx,
02bb8761fcce Initial load
duke
parents:
diff changeset
   246
                                              operation,
02bb8761fcce Initial load
duke
parents:
diff changeset
   247
                                              arg_list,
02bb8761fcce Initial load
duke
parents:
diff changeset
   248
                                              result,
02bb8761fcce Initial load
duke
parents:
diff changeset
   249
                                              exceptions,
02bb8761fcce Initial load
duke
parents:
diff changeset
   250
                                              contexts);
02bb8761fcce Initial load
duke
parents:
diff changeset
   251
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   252
02bb8761fcce Initial load
duke
parents:
diff changeset
   253
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   254
     * Retrieves the interface definition for this <code>ObjectImpl</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   255
     * object.
02bb8761fcce Initial load
duke
parents:
diff changeset
   256
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   257
     * @return the <code>org.omg.CORBA.Object</code> instance that is the
02bb8761fcce Initial load
duke
parents:
diff changeset
   258
     *         interface definition for this <code>ObjectImpl</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
   259
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   260
    public org.omg.CORBA.Object _get_interface_def()
02bb8761fcce Initial load
duke
parents:
diff changeset
   261
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   262
        // First try to call the delegate implementation class's
02bb8761fcce Initial load
duke
parents:
diff changeset
   263
        // "Object get_interface_def(..)" method (will work for JDK1.2 ORBs).
02bb8761fcce Initial load
duke
parents:
diff changeset
   264
        // Else call the delegate implementation class's
02bb8761fcce Initial load
duke
parents:
diff changeset
   265
        // "InterfaceDef get_interface(..)" method using reflection
02bb8761fcce Initial load
duke
parents:
diff changeset
   266
        // (will work for pre-JDK1.2 ORBs).
02bb8761fcce Initial load
duke
parents:
diff changeset
   267
02bb8761fcce Initial load
duke
parents:
diff changeset
   268
        org.omg.CORBA.portable.Delegate delegate = _get_delegate();
02bb8761fcce Initial load
duke
parents:
diff changeset
   269
        try {
02bb8761fcce Initial load
duke
parents:
diff changeset
   270
            // If the ORB's delegate class does not implement
02bb8761fcce Initial load
duke
parents:
diff changeset
   271
            // "Object get_interface_def(..)", this will call
02bb8761fcce Initial load
duke
parents:
diff changeset
   272
            // get_interface_def(..) on portable.Delegate.
02bb8761fcce Initial load
duke
parents:
diff changeset
   273
            return delegate.get_interface_def(this);
02bb8761fcce Initial load
duke
parents:
diff changeset
   274
        }
02bb8761fcce Initial load
duke
parents:
diff changeset
   275
        catch( org.omg.CORBA.NO_IMPLEMENT ex ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   276
            // Call "InterfaceDef get_interface(..)" method using reflection.
02bb8761fcce Initial load
duke
parents:
diff changeset
   277
            try {
02bb8761fcce Initial load
duke
parents:
diff changeset
   278
                Class[] argc = { org.omg.CORBA.Object.class };
02bb8761fcce Initial load
duke
parents:
diff changeset
   279
                java.lang.reflect.Method meth =
02bb8761fcce Initial load
duke
parents:
diff changeset
   280
                    delegate.getClass().getMethod("get_interface", argc);
02bb8761fcce Initial load
duke
parents:
diff changeset
   281
                Object[] argx = { this };
02bb8761fcce Initial load
duke
parents:
diff changeset
   282
                return (org.omg.CORBA.Object)meth.invoke(delegate, argx);
02bb8761fcce Initial load
duke
parents:
diff changeset
   283
            }
02bb8761fcce Initial load
duke
parents:
diff changeset
   284
            catch( java.lang.reflect.InvocationTargetException exs ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   285
                Throwable t = exs.getTargetException();
02bb8761fcce Initial load
duke
parents:
diff changeset
   286
                if (t instanceof Error) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   287
                    throw (Error) t;
02bb8761fcce Initial load
duke
parents:
diff changeset
   288
                }
02bb8761fcce Initial load
duke
parents:
diff changeset
   289
                else if (t instanceof RuntimeException) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   290
                    throw (RuntimeException) t;
02bb8761fcce Initial load
duke
parents:
diff changeset
   291
                }
02bb8761fcce Initial load
duke
parents:
diff changeset
   292
                else {
02bb8761fcce Initial load
duke
parents:
diff changeset
   293
                    throw new org.omg.CORBA.NO_IMPLEMENT();
02bb8761fcce Initial load
duke
parents:
diff changeset
   294
                }
02bb8761fcce Initial load
duke
parents:
diff changeset
   295
            } catch( RuntimeException rex ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   296
                throw rex;
02bb8761fcce Initial load
duke
parents:
diff changeset
   297
            } catch( Exception exr ) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   298
                throw new org.omg.CORBA.NO_IMPLEMENT();
02bb8761fcce Initial load
duke
parents:
diff changeset
   299
            }
02bb8761fcce Initial load
duke
parents:
diff changeset
   300
        }
02bb8761fcce Initial load
duke
parents:
diff changeset
   301
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   302
02bb8761fcce Initial load
duke
parents:
diff changeset
   303
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   304
     * Returns a reference to the ORB associated with this object and
02bb8761fcce Initial load
duke
parents:
diff changeset
   305
     * its delegate.  This is the <code>ORB</code> object that created
02bb8761fcce Initial load
duke
parents:
diff changeset
   306
     * the delegate.
02bb8761fcce Initial load
duke
parents:
diff changeset
   307
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   308
     * @return the <code>ORB</code> instance that created the
02bb8761fcce Initial load
duke
parents:
diff changeset
   309
     *          <code>Delegate</code> object contained in this
02bb8761fcce Initial load
duke
parents:
diff changeset
   310
     *          <code>ObjectImpl</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
   311
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   312
    public org.omg.CORBA.ORB _orb() {
02bb8761fcce Initial load
duke
parents:
diff changeset
   313
        return _get_delegate().orb(this);
02bb8761fcce Initial load
duke
parents:
diff changeset
   314
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   315
02bb8761fcce Initial load
duke
parents:
diff changeset
   316
02bb8761fcce Initial load
duke
parents:
diff changeset
   317
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   318
     * Retrieves the <code>Policy</code> object for this
02bb8761fcce Initial load
duke
parents:
diff changeset
   319
     * <code>ObjectImpl</code> object that has the given
02bb8761fcce Initial load
duke
parents:
diff changeset
   320
     * policy type.
02bb8761fcce Initial load
duke
parents:
diff changeset
   321
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   322
     * @param policy_type an int indicating the policy type
02bb8761fcce Initial load
duke
parents:
diff changeset
   323
     * @return the <code>Policy</code> object that is the specified policy type
02bb8761fcce Initial load
duke
parents:
diff changeset
   324
     *         and that applies to this <code>ObjectImpl</code> object
02bb8761fcce Initial load
duke
parents:
diff changeset
   325
     * @see org.omg.CORBA.PolicyOperations#policy_type
02bb8761fcce Initial load
duke
parents:
diff changeset
   326
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   327
    public org.omg.CORBA.Policy _get_policy(int policy_type) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   328
        return _get_delegate().get_policy(this, policy_type);
02bb8761fcce Initial load
duke
parents:
diff changeset
   329
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   330
02bb8761fcce Initial load
duke
parents:
diff changeset
   331
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   332
     * Retrieves a list of the domain managers for this
02bb8761fcce Initial load
duke
parents:
diff changeset
   333
     * <code>ObjectImpl</code> object.
02bb8761fcce Initial load
duke
parents:
diff changeset
   334
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   335
     * @return an array containing the <code>DomainManager</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   336
     *         objects for this instance of <code>ObjectImpl</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   337
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   338
    public org.omg.CORBA.DomainManager[] _get_domain_managers() {
02bb8761fcce Initial load
duke
parents:
diff changeset
   339
        return _get_delegate().get_domain_managers(this);
02bb8761fcce Initial load
duke
parents:
diff changeset
   340
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   341
02bb8761fcce Initial load
duke
parents:
diff changeset
   342
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   343
     * Sets this <code>ObjectImpl</code> object's override type for
02bb8761fcce Initial load
duke
parents:
diff changeset
   344
     * the given policies to the given instance of
02bb8761fcce Initial load
duke
parents:
diff changeset
   345
     * <code>SetOverrideType</code>.
02bb8761fcce Initial load
duke
parents:
diff changeset
   346
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   347
     * @param policies an array of <code>Policy</code> objects with the
02bb8761fcce Initial load
duke
parents:
diff changeset
   348
     *         policies that will replace the current policies or be
02bb8761fcce Initial load
duke
parents:
diff changeset
   349
     *         added to the current policies
02bb8761fcce Initial load
duke
parents:
diff changeset
   350
     * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>,
02bb8761fcce Initial load
duke
parents:
diff changeset
   351
     *         indicating that the given policies will replace any existing
02bb8761fcce Initial load
duke
parents:
diff changeset
   352
     *         ones, or <code>SetOverrideType.ADD_OVERRIDE</code>, indicating
02bb8761fcce Initial load
duke
parents:
diff changeset
   353
     *         that the given policies should be added to any existing ones
02bb8761fcce Initial load
duke
parents:
diff changeset
   354
     * @return an <code>Object</code> with the given policies replacing or
02bb8761fcce Initial load
duke
parents:
diff changeset
   355
     *         added to its previous policies
02bb8761fcce Initial load
duke
parents:
diff changeset
   356
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   357
    public org.omg.CORBA.Object
02bb8761fcce Initial load
duke
parents:
diff changeset
   358
        _set_policy_override(org.omg.CORBA.Policy[] policies,
02bb8761fcce Initial load
duke
parents:
diff changeset
   359
                             org.omg.CORBA.SetOverrideType set_add) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   360
        return _get_delegate().set_policy_override(this, policies,
02bb8761fcce Initial load
duke
parents:
diff changeset
   361
                                                   set_add);
02bb8761fcce Initial load
duke
parents:
diff changeset
   362
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   363
02bb8761fcce Initial load
duke
parents:
diff changeset
   364
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   365
     * Checks whether this <code>ObjectImpl</code> object is implemented
02bb8761fcce Initial load
duke
parents:
diff changeset
   366
     * by a local servant.  If so, local invocation API's may be used.
02bb8761fcce Initial load
duke
parents:
diff changeset
   367
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   368
     * @return <code>true</code> if this object is implemented by a local
02bb8761fcce Initial load
duke
parents:
diff changeset
   369
     *         servant; <code>false</code> otherwise
02bb8761fcce Initial load
duke
parents:
diff changeset
   370
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   371
    public boolean _is_local() {
02bb8761fcce Initial load
duke
parents:
diff changeset
   372
        return _get_delegate().is_local(this);
02bb8761fcce Initial load
duke
parents:
diff changeset
   373
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   374
02bb8761fcce Initial load
duke
parents:
diff changeset
   375
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   376
     * Returns a Java reference to the local servant that should be used for sending
02bb8761fcce Initial load
duke
parents:
diff changeset
   377
     * a request for the method specified. If this <code>ObjectImpl</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   378
     * object is a local stub, it will invoke the <code>_servant_preinvoke</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   379
     * method before sending a request in order to obtain the
02bb8761fcce Initial load
duke
parents:
diff changeset
   380
     * <code>ServantObject</code> instance to use.
02bb8761fcce Initial load
duke
parents:
diff changeset
   381
     * <P>
02bb8761fcce Initial load
duke
parents:
diff changeset
   382
     * If a <code>ServantObject</code> object is returned, its <code>servant</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   383
     * field has been set to an object of the expected type (Note: the object may
02bb8761fcce Initial load
duke
parents:
diff changeset
   384
     * or may not be the actual servant instance). The local stub may cast
02bb8761fcce Initial load
duke
parents:
diff changeset
   385
     * the servant field to the expected type, and then invoke the operation
02bb8761fcce Initial load
duke
parents:
diff changeset
   386
     * directly. The <code>ServantRequest</code> object is valid for only one
02bb8761fcce Initial load
duke
parents:
diff changeset
   387
     * invocation and cannot be used for more than one invocation.
02bb8761fcce Initial load
duke
parents:
diff changeset
   388
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   389
     * @param operation a <code>String</code> containing the name of the method
02bb8761fcce Initial load
duke
parents:
diff changeset
   390
     *        to be invoked. This name should correspond to the method name as
02bb8761fcce Initial load
duke
parents:
diff changeset
   391
     *        it would be encoded in a GIOP request.
02bb8761fcce Initial load
duke
parents:
diff changeset
   392
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   393
     * @param expectedType a <code>Class</code> object representing the
02bb8761fcce Initial load
duke
parents:
diff changeset
   394
     *        expected type of the servant that is returned. This expected
02bb8761fcce Initial load
duke
parents:
diff changeset
   395
     *        type is the <code>Class</code> object associated with the
02bb8761fcce Initial load
duke
parents:
diff changeset
   396
     *        operations class for the stub's interface. For example, a
02bb8761fcce Initial load
duke
parents:
diff changeset
   397
     *        stub for an interface <code>Foo</code> would pass the
02bb8761fcce Initial load
duke
parents:
diff changeset
   398
     *        <code>Class</code> object for the <code>FooOperations</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   399
     *        interface.
02bb8761fcce Initial load
duke
parents:
diff changeset
   400
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   401
     * @return (1) a <code>ServantObject</code> object, which may or may
02bb8761fcce Initial load
duke
parents:
diff changeset
   402
     *         not be the actual servant instance, or (2) <code>null</code> if
02bb8761fcce Initial load
duke
parents:
diff changeset
   403
     *         (a) the servant is not local or (b) the servant has ceased to
02bb8761fcce Initial load
duke
parents:
diff changeset
   404
     *         be local due to a ForwardRequest from a POA ServantManager
02bb8761fcce Initial load
duke
parents:
diff changeset
   405
     * @throws org.omg.CORBA.BAD_PARAM if the servant is not the expected type
02bb8761fcce Initial load
duke
parents:
diff changeset
   406
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   407
    public ServantObject _servant_preinvoke(String operation,
02bb8761fcce Initial load
duke
parents:
diff changeset
   408
                                            Class expectedType) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   409
        return _get_delegate().servant_preinvoke(this, operation,
02bb8761fcce Initial load
duke
parents:
diff changeset
   410
                                                 expectedType);
02bb8761fcce Initial load
duke
parents:
diff changeset
   411
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   412
02bb8761fcce Initial load
duke
parents:
diff changeset
   413
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   414
     * Is called by the local stub after it has invoked an operation
02bb8761fcce Initial load
duke
parents:
diff changeset
   415
     * on the local servant that was previously retrieved from a
02bb8761fcce Initial load
duke
parents:
diff changeset
   416
     * call to the method <code>_servant_preinvoke</code>.
02bb8761fcce Initial load
duke
parents:
diff changeset
   417
     * The <code>_servant_postinvoke</code> method must be called
02bb8761fcce Initial load
duke
parents:
diff changeset
   418
     * if the <code>_servant_preinvoke</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   419
     * method returned a non-null value, even if an exception was thrown
02bb8761fcce Initial load
duke
parents:
diff changeset
   420
     * by the method invoked by the servant. For this reason, the call
02bb8761fcce Initial load
duke
parents:
diff changeset
   421
     * to the method <code>_servant_postinvoke</code> should be placed
02bb8761fcce Initial load
duke
parents:
diff changeset
   422
     * in a Java <code>finally</code> clause.
02bb8761fcce Initial load
duke
parents:
diff changeset
   423
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   424
     * @param servant the instance of the <code>ServantObject</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   425
     *        returned by the <code>_servant_preinvoke</code> method
02bb8761fcce Initial load
duke
parents:
diff changeset
   426
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   427
    public void _servant_postinvoke(ServantObject servant) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   428
        _get_delegate().servant_postinvoke(this, servant);
02bb8761fcce Initial load
duke
parents:
diff changeset
   429
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   430
02bb8761fcce Initial load
duke
parents:
diff changeset
   431
    /*
02bb8761fcce Initial load
duke
parents:
diff changeset
   432
     * The following methods were added by orbos/98-04-03: Java to IDL
02bb8761fcce Initial load
duke
parents:
diff changeset
   433
     * Mapping. These are used by RMI over IIOP.
02bb8761fcce Initial load
duke
parents:
diff changeset
   434
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   435
02bb8761fcce Initial load
duke
parents:
diff changeset
   436
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   437
     * Returns an <code>OutputStream</code> object to use for marshalling
02bb8761fcce Initial load
duke
parents:
diff changeset
   438
     * the arguments of the given method.  This method is called by a stub,
02bb8761fcce Initial load
duke
parents:
diff changeset
   439
     * which must indicate if a response is expected, that is, whether or not
02bb8761fcce Initial load
duke
parents:
diff changeset
   440
     * the call is oneway.
02bb8761fcce Initial load
duke
parents:
diff changeset
   441
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   442
     * @param operation         a String giving the name of the method.
02bb8761fcce Initial load
duke
parents:
diff changeset
   443
     * @param responseExpected  a boolean -- <code>true</code> if the
02bb8761fcce Initial load
duke
parents:
diff changeset
   444
     *         request is not one way, that is, a response is expected
02bb8761fcce Initial load
duke
parents:
diff changeset
   445
     * @return an <code>OutputStream</code> object for dispatching the request
02bb8761fcce Initial load
duke
parents:
diff changeset
   446
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   447
    public OutputStream _request(String operation,
02bb8761fcce Initial load
duke
parents:
diff changeset
   448
                                 boolean responseExpected) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   449
        return _get_delegate().request(this, operation, responseExpected);
02bb8761fcce Initial load
duke
parents:
diff changeset
   450
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   451
02bb8761fcce Initial load
duke
parents:
diff changeset
   452
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   453
     * Invokes an operation and returns an <code>InputStream</code>
02bb8761fcce Initial load
duke
parents:
diff changeset
   454
     * object for reading the response. The stub provides the
02bb8761fcce Initial load
duke
parents:
diff changeset
   455
     * <code>OutputStream</code> object that was previously returned by a
02bb8761fcce Initial load
duke
parents:
diff changeset
   456
     * call to the <code>_request</code> method. The method specified
02bb8761fcce Initial load
duke
parents:
diff changeset
   457
     * as an argument to <code>_request</code> when it was
02bb8761fcce Initial load
duke
parents:
diff changeset
   458
     * called previously is the method that this method invokes.
02bb8761fcce Initial load
duke
parents:
diff changeset
   459
     * <P>
02bb8761fcce Initial load
duke
parents:
diff changeset
   460
     * If an exception occurs, the <code>_invoke</code> method may throw an
02bb8761fcce Initial load
duke
parents:
diff changeset
   461
     * <code>ApplicationException</code> object that contains an InputStream from
02bb8761fcce Initial load
duke
parents:
diff changeset
   462
     * which the user exception state may be unmarshalled.
02bb8761fcce Initial load
duke
parents:
diff changeset
   463
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   464
     * @param output  an OutputStream object for dispatching the request
02bb8761fcce Initial load
duke
parents:
diff changeset
   465
     * @return an <code>InputStream</code> object containing the marshalled
02bb8761fcce Initial load
duke
parents:
diff changeset
   466
     *         response to the method invoked
02bb8761fcce Initial load
duke
parents:
diff changeset
   467
     * @throws ApplicationException if the invocation
02bb8761fcce Initial load
duke
parents:
diff changeset
   468
     *         meets application-defined exception
02bb8761fcce Initial load
duke
parents:
diff changeset
   469
     * @throws RemarshalException if the invocation leads
02bb8761fcce Initial load
duke
parents:
diff changeset
   470
     *         to a remarshalling error
02bb8761fcce Initial load
duke
parents:
diff changeset
   471
     * @see #_request
02bb8761fcce Initial load
duke
parents:
diff changeset
   472
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   473
    public InputStream _invoke(OutputStream output)
02bb8761fcce Initial load
duke
parents:
diff changeset
   474
        throws ApplicationException, RemarshalException {
02bb8761fcce Initial load
duke
parents:
diff changeset
   475
        return _get_delegate().invoke(this, output);
02bb8761fcce Initial load
duke
parents:
diff changeset
   476
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   477
02bb8761fcce Initial load
duke
parents:
diff changeset
   478
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   479
     * Releases the given
02bb8761fcce Initial load
duke
parents:
diff changeset
   480
     * reply stream back to the ORB when unmarshalling has
02bb8761fcce Initial load
duke
parents:
diff changeset
   481
     * completed after a call to the method <code>_invoke</code>.
02bb8761fcce Initial load
duke
parents:
diff changeset
   482
     * Calling this method is optional for the stub.
02bb8761fcce Initial load
duke
parents:
diff changeset
   483
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   484
     * @param input  the <code>InputStream</code> object that was returned
02bb8761fcce Initial load
duke
parents:
diff changeset
   485
     *        by the <code>_invoke</code> method or the
02bb8761fcce Initial load
duke
parents:
diff changeset
   486
     *        <code>ApplicationException.getInputStream</code> method;
02bb8761fcce Initial load
duke
parents:
diff changeset
   487
     *        may be <code>null</code>, in which case this method does
02bb8761fcce Initial load
duke
parents:
diff changeset
   488
     *        nothing
02bb8761fcce Initial load
duke
parents:
diff changeset
   489
     * @see #_invoke
02bb8761fcce Initial load
duke
parents:
diff changeset
   490
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   491
    public void _releaseReply(InputStream input) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   492
        _get_delegate().releaseReply(this, input);
02bb8761fcce Initial load
duke
parents:
diff changeset
   493
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   494
02bb8761fcce Initial load
duke
parents:
diff changeset
   495
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   496
     * Returns a <code>String</code> object that represents this
02bb8761fcce Initial load
duke
parents:
diff changeset
   497
     * <code>ObjectImpl</code> object.
02bb8761fcce Initial load
duke
parents:
diff changeset
   498
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   499
     * @return the <code>String</code> representation of this object
02bb8761fcce Initial load
duke
parents:
diff changeset
   500
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   501
    public String toString() {
02bb8761fcce Initial load
duke
parents:
diff changeset
   502
        if ( __delegate != null )
02bb8761fcce Initial load
duke
parents:
diff changeset
   503
           return __delegate.toString(this);
02bb8761fcce Initial load
duke
parents:
diff changeset
   504
        else
02bb8761fcce Initial load
duke
parents:
diff changeset
   505
           return getClass().getName() + ": no delegate set";
02bb8761fcce Initial load
duke
parents:
diff changeset
   506
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   507
02bb8761fcce Initial load
duke
parents:
diff changeset
   508
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   509
     * Returns the hash code for this <code>ObjectImpl</code> object.
02bb8761fcce Initial load
duke
parents:
diff changeset
   510
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   511
     * @return the hash code for this object
02bb8761fcce Initial load
duke
parents:
diff changeset
   512
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   513
    public int hashCode() {
02bb8761fcce Initial load
duke
parents:
diff changeset
   514
        if ( __delegate != null )
02bb8761fcce Initial load
duke
parents:
diff changeset
   515
           return __delegate.hashCode(this);
02bb8761fcce Initial load
duke
parents:
diff changeset
   516
        else
02bb8761fcce Initial load
duke
parents:
diff changeset
   517
            return super.hashCode();
02bb8761fcce Initial load
duke
parents:
diff changeset
   518
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   519
02bb8761fcce Initial load
duke
parents:
diff changeset
   520
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   521
     * Compares this <code>ObjectImpl</code> object with the given one
02bb8761fcce Initial load
duke
parents:
diff changeset
   522
     * for equality.
02bb8761fcce Initial load
duke
parents:
diff changeset
   523
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   524
     *@param obj the object with which to compare this object
02bb8761fcce Initial load
duke
parents:
diff changeset
   525
     *@return <code>true</code> if the two objects are equal;
02bb8761fcce Initial load
duke
parents:
diff changeset
   526
     *        <code>false</code> otherwise
02bb8761fcce Initial load
duke
parents:
diff changeset
   527
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   528
    public boolean equals(java.lang.Object obj) {
02bb8761fcce Initial load
duke
parents:
diff changeset
   529
        if ( __delegate != null )
02bb8761fcce Initial load
duke
parents:
diff changeset
   530
           return __delegate.equals(this, obj);
02bb8761fcce Initial load
duke
parents:
diff changeset
   531
        else
02bb8761fcce Initial load
duke
parents:
diff changeset
   532
           return (this==obj);
02bb8761fcce Initial load
duke
parents:
diff changeset
   533
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   534
}