1 /* ClientRequestInfoOperations.java --
2 Copyright (C) 2005 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package org
.omg
.PortableInterceptor
;
41 import org
.omg
.CORBA
.Any
;
42 import org
.omg
.CORBA
.BAD_PARAM
;
43 import org
.omg
.CORBA
.INV_POLICY
;
44 import org
.omg
.CORBA
.Policy
;
45 import org
.omg
.IOP
.ServiceContext
;
46 import org
.omg
.IOP
.TaggedComponent
;
47 import org
.omg
.IOP
.TaggedProfile
;
50 * Provides request information, accessible for the
51 * {@linkplain ClientRequestInterceptor}. Some methods of this interface are
52 * not valid at all interception points. The following table shows the validity
53 * of each method. If it is not valid, BAD_INV_ORDER minor 14 will be thrown.
58 * <th>{@linkplain ClientRequestInterceptorOperations#send_request send_request}</th>
59 * <th>{@linkplain ClientRequestInterceptorOperations#send_poll send_poll}</th>
60 * <th>{@linkplain ClientRequestInterceptorOperations#receive_reply receive_reply}</th>
61 * <th>{@linkplain ClientRequestInterceptorOperations#receive_exception receive_exception}</th>
62 * <th>{@linkplain ClientRequestInterceptorOperations#receive_other receive_other}</th>
65 * <td colspan="6" align="center" bgcolor="#E0E0FF"><i>Inherited from
66 * {@linkplain RequestInfoOperations}:</i></td>
69 * <th>{@linkplain RequestInfoOperations#arguments arguments}</th>
70 * <td bgcolor="#E0E0E0" title="in and inout only">yes <sub><a href="#1">1</a></sub></td>
71 * <td bgcolor="lightgray">no </td>
73 * <td bgcolor="lightgray">no </td>
74 * <td bgcolor="lightgray">no </td>
77 * <th>{@linkplain RequestInfoOperations#exceptions exceptions}</th>
79 * <td bgcolor="lightgray">no </td>
80 * <td colspan="3" align ="center">yes</td>
83 * <th>{@linkplain RequestInfoOperations#contexts contexts}</th>
85 * <td bgcolor="lightgray">no </td>
86 * <td colspan="3" align ="center">yes</td>
89 * <th>{@linkplain RequestInfoOperations#operation_context operation_context}</th>
91 * <td bgcolor="lightgray">no </td>
92 * <td colspan="3" align ="center">yes</td>
96 * <th>{@linkplain RequestInfoOperations#result result}</th>
97 * <td bgcolor="lightgray">no </td>
98 * <td bgcolor="lightgray">no </td>
100 * <td bgcolor="lightgray">no </td>
101 * <td bgcolor="lightgray">no </td>
104 * <th>{@linkplain RequestInfoOperations#sync_scope sync_scope}</th>
106 * <td bgcolor="lightgray">no </td>
107 * <td colspan="3" align ="center">yes</td>
111 * <th>{@linkplain RequestInfoOperations#reply_status reply_status}</th>
112 * <td bgcolor="lightgray">no </td>
113 * <td bgcolor="lightgray">no </td>
114 * <td colspan="3" align ="center">yes</td>
117 * <th>{@linkplain RequestInfoOperations#forward_reference forward_reference}</th>
119 * <td bgcolor="lightgray" colspan="3" align="center">no</td>
120 * <td bgcolor="#E0E0E0" title="When reply_status = LOCATION_FORWARD">yes <sub><a
121 * href="#2">2</a></sub> </td>
124 * <th>{@linkplain RequestInfoOperations#get_request_service_context get_request_service_context}</th>
126 * <td bgcolor="lightgray">no </td>
127 * <td colspan="3" align ="center">yes</td>
130 * <th>{@linkplain RequestInfoOperations#get_reply_service_context get_reply_service_context}</th>
131 * <td bgcolor="lightgray">no </td>
132 * <td bgcolor="lightgray">no </td>
133 * <td colspan="3" align ="center">yes</td>
137 * <th>{@linkplain RequestInfoOperations#request_id request_id}</th>
138 * <td colspan="5" align ="center">yes</td>
141 * <th>{@linkplain RequestInfoOperations#operation operation}</th>
142 * <td colspan="5" align ="center">yes</td>
145 * <th>{@linkplain RequestInfoOperations#response_expected response_expected}</th>
146 * <td colspan="5" align ="center">yes</td>
149 * <th>{@linkplain RequestInfoOperations#get_slot get_slot}</th>
150 * <td colspan="5" align ="center">yes</td>
153 * <td colspan="6" align="center" bgcolor="#E0E0FF"><i>ClientRequestInfo-specific:</i></td>
156 * <th>{@linkplain #target target}</th>
157 * <td colspan="5" align ="center">yes</td>
160 * <th>{@linkplain #effective_target effective_target}</th>
161 * <td colspan="5" align ="center">yes</td>
164 * <th>{@linkplain #effective_profile effective_profile}</th>
165 * <td colspan="5" align ="center">yes</td>
168 * <th>{@linkplain #received_exception received_exception}</th>
169 * <td bgcolor="lightgray" colspan="3" align="center">no</td>
171 * <td bgcolor="lightgray">no </td>
174 * <th>{@linkplain #received_exception_id received_exception_id}</th>
175 * <td bgcolor="lightgray" colspan="3" align="center">no</td>
177 * <td bgcolor="lightgray">no </td>
180 * <th>{@linkplain #get_effective_component get_effective_component}</th>
182 * <td bgcolor="lightgray">no </td>
183 * <td colspan="3" align ="center">yes</td>
186 * <th>{@linkplain #get_effective_components get_effective_components}</th>
188 * <td bgcolor="lightgray">no </td>
189 * <td colspan="3" align ="center">yes</td>
192 * <th>{@linkplain #get_request_policy get_request_policy}</th>
194 * <td bgcolor="lightgray">no </td>
195 * <td colspan="3" align ="center">yes</td>
198 * <th>{@linkplain #add_request_service_context add_request_service_context}</th>
200 * <td bgcolor="lightgray" colspan="4" align="center">no</td>
204 * <th>{@linkplain ClientRequestInterceptorOperations#send_request send_request}</th>
205 * <th>{@linkplain ClientRequestInterceptorOperations#send_poll send_poll}</th>
206 * <th>{@linkplain ClientRequestInterceptorOperations#receive_reply receive_reply}</th>
207 * <th>{@linkplain ClientRequestInterceptorOperations#receive_exception receive_exception}</th>
208 * <th>{@linkplain ClientRequestInterceptorOperations#receive_other receive_other}</th>
212 * <li><a name="1">When ClientRequestInfo is passed to send_request, there is
213 * an entry in the list for every argument, but only the in and inout arguments
214 * will be available.</a></li>
215 * <li><a name="2">If the reply_status atribute is not LOCATION_FORWARD,
216 * accessing this attribute will throw BAD_INV_ORDER with a standard minor code
220 * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
222 public interface ClientRequestInfoOperations
extends RequestInfoOperations
225 * Returns the object on that the client has invoked the the operation. If the
226 * request was forwarded, it will not be the same object that actually
227 * processed the request.
229 * @return the initial client invocation target.
231 * @see #effective_target()
233 org
.omg
.CORBA
.Object
target();
236 * Returns the object on that the operation will be invoked after handling the
237 * possible forwarding.
239 * @return the final invocation target.
243 org
.omg
.CORBA
.Object
effective_target();
246 * Returns the tagged profile (IOR) of the invocation target. If the request
247 * was forwarded, the method returns the new location, shown by the forwarding
250 * @return the invocation IOR.
252 TaggedProfile
effective_profile();
255 * Returns the given component of the invocation target profile. If the
256 * profile contains multiple components with the same Id, it is not defined,
257 * which one will be returned.
259 * @param id the component id.
261 * @return the profile component with the given Id.
263 * @throws BAD_PARAM minor 28 in there are no any components with the given Id
266 TaggedComponent
get_effective_component(int id
) throws BAD_PARAM
;
269 * Returns the given components of the invocation target profile. This method
270 * is uses when the profile may contain multiple components with the same Id.
272 * @param id the component id.
274 * @return the array of all profile components with the given Id.
276 * @throws BAD_PARAM minor 28 in there are no any components with the given Id
279 TaggedComponent
[] get_effective_components(int id
) throws BAD_PARAM
;
282 * This should return the policy of the given type that applies to this
283 * operation, but it is not implemented up till JDK 1.5 inclusive.
285 * @param type the type of the policy being requested.
287 * @return should return the policy that applies to this operation.
289 * @throws NO_IMPLEMENT always.
291 Policy
get_request_policy(int type
) throws INV_POLICY
;
294 * Returns the repository id of the remote exception that was thrown on the
297 * @return the exception repository id.
299 * @see #received_exception()
301 String
received_exception_id();
304 * Returns the remote exception that was thrown on the server side.
306 * @return the Any, holding this exception.
308 * @see #received_exception_id()
310 Any
received_exception();
313 * Allows the interceptor to add the service contexts to the request. Such
314 * added contexts can carry arbitrary data and can be later accessed on the
315 * server side by the server request interceptor, using
316 * {@link RequestInfoOperations#get_request_service_context}.
318 * @param service_context the context to add.
319 * @param replace if true, the existing context with the same Id will be
320 * replaced. If false, the BAD_INV_ORDER will be thrown in that case.
322 * @throws BAD_INV_ORDER minor 15 if the context with the same Id already
323 * exists and replace=false.
325 void add_request_service_context(ServiceContext service_context
,