corba/src/share/classes/com/sun/corba/se/spi/protocol/PIHandler.java
author coffeys
Wed, 27 Jun 2012 21:09:29 +0100
changeset 13171 1ac5e9a54a6e
parent 7672 aec650969dd5
permissions -rw-r--r--
7162902: Umbrella port of a number of corba bug fixes from JDK 6 to jdk7u/8 Reviewed-by: lancea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
/*
13171
1ac5e9a54a6e 7162902: Umbrella port of a number of corba bug fixes from JDK 6 to jdk7u/8
coffeys
parents: 7672
diff changeset
     2
 * Copyright (c) 2002, 2012, 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 com.sun.corba.se.spi.protocol;
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
13171
1ac5e9a54a6e 7162902: Umbrella port of a number of corba bug fixes from JDK 6 to jdk7u/8
coffeys
parents: 7672
diff changeset
    28
import java.io.Closeable;
1ac5e9a54a6e 7162902: Umbrella port of a number of corba bug fixes from JDK 6 to jdk7u/8
coffeys
parents: 7672
diff changeset
    29
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
import org.omg.PortableInterceptor.ObjectReferenceTemplate ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
import org.omg.PortableInterceptor.Interceptor ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
import org.omg.PortableInterceptor.Current ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    33
import org.omg.PortableInterceptor.PolicyFactory ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
import org.omg.CORBA.NVList ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
import org.omg.CORBA.Any ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
import org.omg.CORBA.Policy ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
import org.omg.CORBA.PolicyError ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
import org.omg.CORBA.portable.RemarshalException;
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
import com.sun.corba.se.spi.oa.ObjectAdapter ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
import com.sun.corba.se.spi.protocol.CorbaMessageMediator ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
import com.sun.corba.se.spi.ior.ObjectKeyTemplate ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
// XXX These need to go away.
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
import com.sun.corba.se.impl.corba.RequestImpl ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
/** This interface defines the PI interface that is used to interface the rest of the
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
 * ORB to the PI implementation.
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
 */
13171
1ac5e9a54a6e 7162902: Umbrella port of a number of corba bug fixes from JDK 6 to jdk7u/8
coffeys
parents: 7672
diff changeset
    56
public interface PIHandler extends Closeable {
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
    /** Complete the initialization of the PIHandler.  This will execute the methods
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
    * on the ORBInitializers, if any are defined.  This must be done here so that
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
    * the ORB can obtain the PIHandler BEFORE the ORBInitializers run, since they
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
    * will need access to the PIHandler through the ORB.
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
    */
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
    public void initialize() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
    public void destroyInterceptors() ;
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
     * IOR interceptor PI hooks
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
     ****************************/
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
     * Called when a new object adapter is created.
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
     * @param oa The adapter associated with the interceptors to be
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
     *   invoked.
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
    void objectAdapterCreated( ObjectAdapter oa )  ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
     * Called whenever a state change occurs in an adapter manager.
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
     * @param managerId managerId The adapter manager id
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
     * @param newState newState The new state of the adapter manager,
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
     * and by implication of all object adapters managed by this manager.
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
    void adapterManagerStateChanged( int managerId,
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
        short newState ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
    /** Called whenever a state change occurs in an object adapter that
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
    * was not caused by an adapter manager state change.
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
    *
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
    * @param templates The templates that are changing state.
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
    * @param newState The new state of the adapters identified by the
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
    * templates.
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
    */
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
    void adapterStateChanged( ObjectReferenceTemplate[] templates,
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
        short newState ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
    /*
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
     *****************
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
     * Client PI hooks
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
     *****************/
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
     * Called for pseudo-ops to temporarily disable portable interceptor
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
     * hooks for calls on this thread.  Keeps track of the number of
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
     * times this is called and increments the disabledCount.
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
    void disableInterceptorsThisThread() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
     * Called for pseudo-ops to re-enable portable interceptor
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
     * hooks for calls on this thread.  Decrements the disabledCount.
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
     * If disabledCount is 0, interceptors are re-enabled.
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
    void enableInterceptorsThisThread() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
     * Called when the send_request or send_poll portable interception point
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
     * is to be invoked for all appropriate client-side request interceptors.
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
     * @exception RemarhsalException - Thrown when this request needs to
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
     *     be retried.
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
    void invokeClientPIStartingPoint()
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
        throws RemarshalException ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
     * Called when the appropriate client ending interception point is
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
     * to be invoked for all apporpriate client-side request interceptors.
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
     * @param replyStatus One of the constants in iiop.messages.ReplyMessage
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
     *     indicating which reply status to set.
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
     * @param exception The exception before ending interception points have
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
     *     been invoked, or null if no exception at the moment.
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
     * @return The exception to be thrown, after having gone through
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
     *     all ending points, or null if there is no exception to be
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
     *     thrown.  Note that this exception can be either the same or
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
     *     different from the exception set using setClientPIException.
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
     *     There are four possible return types: null (no exception),
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
     *     SystemException, UserException, or RemarshalException.
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   143
    Exception invokeClientPIEndingPoint(
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
        int replyStatus, Exception exception ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   145
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
    /**
7197
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   147
     * Called when a retry is needed after initiateClientPIRequest but
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   148
     * before invokeClientPIRequest.  In this case, we need to properly
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   149
     * balance initiateClientPIRequest/cleanupClientPIRequest calls,
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   150
     * but WITHOUT extraneous calls to invokeClientPIEndingPoint
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   151
     * (see bug 6763340).
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   152
     *
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   153
     * @param replyStatus One of the constants in iiop.messages.ReplyMessage
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   154
     *     indicating which reply status to set.
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   155
     * @param exception The exception before ending interception points have
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   156
     *     been invoked, or null if no exception at the moment.
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   157
     * @return The exception to be thrown, after having gone through
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   158
     *     all ending points, or null if there is no exception to be
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   159
     *     thrown.  Note that this exception can be either the same or
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   160
     *     different from the exception set using setClientPIException.
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   161
     *     There are four possible return types: null (no exception),
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   162
     *     SystemException, UserException, or RemarshalException.
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   163
     */
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   164
    Exception makeCompletedClientRequest(
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   165
        int replyStatus, Exception exception ) ;
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   166
a3c4c326e934 6763340: memory leak in com.sun.corba.se.* classes
robm
parents: 5555
diff changeset
   167
    /**
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
     * Invoked when a request is about to be created.  Must be called before
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
     * any of the setClientPI* methods so that a new info object can be
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
     * prepared for information collection.
02bb8761fcce Initial load
duke
parents:
diff changeset
   171
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   172
     * @param diiRequest True if this is to be a DII request, or false if it
02bb8761fcce Initial load
duke
parents:
diff changeset
   173
     *     is a "normal" request.  In the DII case, initiateClientPIRequest
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
     *     is called twice and we need to ignore the second one.
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   176
    void initiateClientPIRequest( boolean diiRequest ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   177
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
     * Invoked when a request is about to be cleaned up.  Must be called
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
     * after ending points are called so that the info object on the stack
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
     * can be deinitialized and popped from the stack at the appropriate
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
     * time.
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
    void cleanupClientPIRequest() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
     * Notifies PI of additional information for client-side interceptors.
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
     * PI will use this information as a source of information for the
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
     * ClientRequestInfo object.
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
    void setClientPIInfo( RequestImpl requestImpl ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   194
     * Notify PI of the MessageMediator for the request.
02bb8761fcce Initial load
duke
parents:
diff changeset
   195
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
    void setClientPIInfo(CorbaMessageMediator messageMediator) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   197
02bb8761fcce Initial load
duke
parents:
diff changeset
   198
    /*
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
     *****************
02bb8761fcce Initial load
duke
parents:
diff changeset
   200
     * Server PI hooks
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
     *****************/
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   204
     * Called when the appropriate server starting interception point is
02bb8761fcce Initial load
duke
parents:
diff changeset
   205
     * to be invoked for all appropriate server-side request interceptors.
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   207
     * @throws ForwardException Thrown if an interceptor raises
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
     *     ForwardRequest.  This is an unchecked exception so that we need
02bb8761fcce Initial load
duke
parents:
diff changeset
   209
     *     not modify the entire execution path to declare throwing
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
     *     ForwardException.
02bb8761fcce Initial load
duke
parents:
diff changeset
   211
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   212
    void invokeServerPIStartingPoint() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   213
02bb8761fcce Initial load
duke
parents:
diff changeset
   214
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
     * Called when the appropriate server intermediate interception point is
02bb8761fcce Initial load
duke
parents:
diff changeset
   216
     * to be invoked for all appropriate server-side request interceptors.
02bb8761fcce Initial load
duke
parents:
diff changeset
   217
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   218
     * @throws ForwardException Thrown if an interceptor raises
02bb8761fcce Initial load
duke
parents:
diff changeset
   219
     *     ForwardRequest.  This is an unchecked exception so that we need
02bb8761fcce Initial load
duke
parents:
diff changeset
   220
     *     not modify the entire execution path to declare throwing
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
     *     ForwardException.
02bb8761fcce Initial load
duke
parents:
diff changeset
   222
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   223
    void invokeServerPIIntermediatePoint() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   224
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   226
     * Called when the appropriate server ending interception point is
02bb8761fcce Initial load
duke
parents:
diff changeset
   227
     * to be invoked for all appropriate server-side request interceptors.
02bb8761fcce Initial load
duke
parents:
diff changeset
   228
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   229
     * @param replyMessage The iiop.messages.ReplyMessage containing the
02bb8761fcce Initial load
duke
parents:
diff changeset
   230
     *     reply status.
02bb8761fcce Initial load
duke
parents:
diff changeset
   231
     * @throws ForwardException Thrown if an interceptor raises
02bb8761fcce Initial load
duke
parents:
diff changeset
   232
     *     ForwardRequest.  This is an unchecked exception so that we need
02bb8761fcce Initial load
duke
parents:
diff changeset
   233
     *     not modify the entire execution path to declare throwing
02bb8761fcce Initial load
duke
parents:
diff changeset
   234
     *     ForwardException.
02bb8761fcce Initial load
duke
parents:
diff changeset
   235
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   236
    void invokeServerPIEndingPoint( ReplyMessage replyMessage ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   237
02bb8761fcce Initial load
duke
parents:
diff changeset
   238
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   239
     * Notifies PI to start a new server request and set initial
02bb8761fcce Initial load
duke
parents:
diff changeset
   240
     * information for server-side interceptors.
02bb8761fcce Initial load
duke
parents:
diff changeset
   241
     * PI will use this information as a source of information for the
02bb8761fcce Initial load
duke
parents:
diff changeset
   242
     * ServerRequestInfo object.  poaimpl is declared as an Object so that
02bb8761fcce Initial load
duke
parents:
diff changeset
   243
     * we need not introduce a dependency on the POA package.
02bb8761fcce Initial load
duke
parents:
diff changeset
   244
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   245
    void initializeServerPIInfo( CorbaMessageMediator request,
02bb8761fcce Initial load
duke
parents:
diff changeset
   246
        ObjectAdapter oa, byte[] objectId, ObjectKeyTemplate oktemp ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   247
02bb8761fcce Initial load
duke
parents:
diff changeset
   248
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   249
     * Notifies PI of additional information reqired for ServerRequestInfo.
02bb8761fcce Initial load
duke
parents:
diff changeset
   250
     *
02bb8761fcce Initial load
duke
parents:
diff changeset
   251
     * @param servant The servant.  This is java.lang.Object because in the
02bb8761fcce Initial load
duke
parents:
diff changeset
   252
     *     POA case, this will be a org.omg.PortableServer.Servant whereas
02bb8761fcce Initial load
duke
parents:
diff changeset
   253
     *     in the ServerRequestDispatcher case this will be an ObjectImpl.
02bb8761fcce Initial load
duke
parents:
diff changeset
   254
     * @param targetMostDerivedInterface.  The most derived interface.  This
02bb8761fcce Initial load
duke
parents:
diff changeset
   255
     *     is passed in instead of calculated when needed because it requires
02bb8761fcce Initial load
duke
parents:
diff changeset
   256
     *     extra information in the POA case that we didn't want to bother
02bb8761fcce Initial load
duke
parents:
diff changeset
   257
     *     creating extra methods for to pass in.
02bb8761fcce Initial load
duke
parents:
diff changeset
   258
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   259
    void setServerPIInfo( java.lang.Object servant,
02bb8761fcce Initial load
duke
parents:
diff changeset
   260
                                    String targetMostDerivedInterface ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   261
02bb8761fcce Initial load
duke
parents:
diff changeset
   262
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   263
     * Notifies PI of additional information required for ServerRequestInfo.
02bb8761fcce Initial load
duke
parents:
diff changeset
   264
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   265
    void setServerPIInfo( Exception exception ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   266
02bb8761fcce Initial load
duke
parents:
diff changeset
   267
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   268
     * Notifies PI of additional information for server-side interceptors.
02bb8761fcce Initial load
duke
parents:
diff changeset
   269
     * PI will use this information as a source of information for the
02bb8761fcce Initial load
duke
parents:
diff changeset
   270
     * ServerRequestInfo object.  These are the arguments for a DSI request.
02bb8761fcce Initial load
duke
parents:
diff changeset
   271
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   272
    void setServerPIInfo( NVList arguments ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   273
02bb8761fcce Initial load
duke
parents:
diff changeset
   274
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   275
     * Notifies PI of additional information for server-side interceptors.
02bb8761fcce Initial load
duke
parents:
diff changeset
   276
     * PI will use this information as a source of information for the
02bb8761fcce Initial load
duke
parents:
diff changeset
   277
     * ServerRequestInfo object.  This is the exception of a DSI request.
02bb8761fcce Initial load
duke
parents:
diff changeset
   278
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   279
    void setServerPIExceptionInfo( Any exception ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   280
02bb8761fcce Initial load
duke
parents:
diff changeset
   281
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   282
     * Notifies PI of additional information for server-side interceptors.
02bb8761fcce Initial load
duke
parents:
diff changeset
   283
     * PI will use this information as a source of information for the
02bb8761fcce Initial load
duke
parents:
diff changeset
   284
     * ServerRequestInfo object.  This is the result of a DSI request.
02bb8761fcce Initial load
duke
parents:
diff changeset
   285
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   286
    void setServerPIInfo( Any result ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   287
02bb8761fcce Initial load
duke
parents:
diff changeset
   288
    /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   289
     * Invoked when a request is about to be cleaned up.  Must be called
02bb8761fcce Initial load
duke
parents:
diff changeset
   290
     * after ending points are called so that the info object on the stack
02bb8761fcce Initial load
duke
parents:
diff changeset
   291
     * can be deinitialized and popped from the stack at the appropriate
02bb8761fcce Initial load
duke
parents:
diff changeset
   292
     * time.
02bb8761fcce Initial load
duke
parents:
diff changeset
   293
     */
02bb8761fcce Initial load
duke
parents:
diff changeset
   294
    void cleanupServerPIRequest() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   295
02bb8761fcce Initial load
duke
parents:
diff changeset
   296
    Policy create_policy( int type, Any val ) throws PolicyError ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   297
02bb8761fcce Initial load
duke
parents:
diff changeset
   298
    void register_interceptor( Interceptor interceptor, int type )
02bb8761fcce Initial load
duke
parents:
diff changeset
   299
        throws DuplicateName ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   300
02bb8761fcce Initial load
duke
parents:
diff changeset
   301
    Current getPICurrent() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   302
02bb8761fcce Initial load
duke
parents:
diff changeset
   303
    void registerPolicyFactory( int type, PolicyFactory factory ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   304
02bb8761fcce Initial load
duke
parents:
diff changeset
   305
    int allocateServerRequestId() ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   306
}