GNU Classpath (0.20) | |
Frames | No Frames |
1: /* ClientRequestInfoOperations.java -- 2: Copyright (C) 2005 Free Software Foundation, Inc. 3: 4: This file is part of GNU Classpath. 5: 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) 9: any later version. 10: 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. 15: 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 19: 02110-1301 USA. 20: 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 24: combination. 25: 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. */ 37: 38: 39: package org.omg.PortableInterceptor; 40: 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; 48: 49: /** 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. 54: * 55: * <table border="1"> 56: * <tr> 57: * <th></th> 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> 63: * </tr> 64: * <tr> 65: * <td colspan="6" align="center" bgcolor="#E0E0FF"><i>Inherited from 66: * {@linkplain RequestInfoOperations}:</i></td> 67: * </tr> 68: * <tr> 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> 72: * <td>yes</td> 73: * <td bgcolor="lightgray">no </td> 74: * <td bgcolor="lightgray">no </td> 75: * </tr> 76: * <tr> 77: * <th>{@linkplain RequestInfoOperations#exceptions exceptions}</th> 78: * <td>yes</td> 79: * <td bgcolor="lightgray">no </td> 80: * <td colspan="3" align ="center">yes</td> 81: * </tr> 82: * <tr> 83: * <th>{@linkplain RequestInfoOperations#contexts contexts}</th> 84: * <td>yes</td> 85: * <td bgcolor="lightgray">no </td> 86: * <td colspan="3" align ="center">yes</td> 87: * </tr> 88: * <tr> 89: * <th>{@linkplain RequestInfoOperations#operation_context operation_context}</th> 90: * <td>yes</td> 91: * <td bgcolor="lightgray">no </td> 92: * <td colspan="3" align ="center">yes</td> 93: * </tr> 94: * </tr> 95: * <tr> 96: * <th>{@linkplain RequestInfoOperations#result result}</th> 97: * <td bgcolor="lightgray">no </td> 98: * <td bgcolor="lightgray">no </td> 99: * <td>yes</td> 100: * <td bgcolor="lightgray">no </td> 101: * <td bgcolor="lightgray">no </td> 102: * </tr> 103: * <tr> 104: * <th>{@linkplain RequestInfoOperations#sync_scope sync_scope}</th> 105: * <td>yes</td> 106: * <td bgcolor="lightgray">no </td> 107: * <td colspan="3" align ="center">yes</td> 108: * </tr> 109: * </tr> 110: * <tr> 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> 115: * </tr> 116: * <tr> 117: * <th>{@linkplain RequestInfoOperations#forward_reference forward_reference}</th> 118: * <td>no</td> 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> 122: * </tr> 123: * <tr> 124: * <th>{@linkplain RequestInfoOperations#get_request_service_context get_request_service_context}</th> 125: * <td>yes</td> 126: * <td bgcolor="lightgray">no </td> 127: * <td colspan="3" align ="center">yes</td> 128: * </tr> 129: * <tr> 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> 134: * </tr> 135: * </tr> 136: * <tr> 137: * <th>{@linkplain RequestInfoOperations#request_id request_id}</th> 138: * <td colspan="5" align ="center">yes</td> 139: * </tr> 140: * <tr> 141: * <th>{@linkplain RequestInfoOperations#operation operation}</th> 142: * <td colspan="5" align ="center">yes</td> 143: * </tr> 144: * <tr> 145: * <th>{@linkplain RequestInfoOperations#response_expected response_expected}</th> 146: * <td colspan="5" align ="center">yes</td> 147: * </tr> 148: * <tr> 149: * <th>{@linkplain RequestInfoOperations#get_slot get_slot}</th> 150: * <td colspan="5" align ="center">yes</td> 151: * </tr> 152: * <tr> 153: * <td colspan="6" align="center" bgcolor="#E0E0FF"><i>ClientRequestInfo-specific:</i></td> 154: * </tr> 155: * <tr> 156: * <th>{@linkplain #target target}</th> 157: * <td colspan="5" align ="center">yes</td> 158: * </tr> 159: * <tr> 160: * <th>{@linkplain #effective_target effective_target}</th> 161: * <td colspan="5" align ="center">yes</td> 162: * </tr> 163: * <tr> 164: * <th>{@linkplain #effective_profile effective_profile}</th> 165: * <td colspan="5" align ="center">yes</td> 166: * </tr> 167: * <tr> 168: * <th>{@linkplain #received_exception received_exception}</th> 169: * <td bgcolor="lightgray" colspan="3" align="center">no</td> 170: * <td>yes</td> 171: * <td bgcolor="lightgray">no </td> 172: * </tr> 173: * <tr> 174: * <th>{@linkplain #received_exception_id received_exception_id}</th> 175: * <td bgcolor="lightgray" colspan="3" align="center">no</td> 176: * <td>yes</td> 177: * <td bgcolor="lightgray">no </td> 178: * </tr> 179: * <tr> 180: * <th>{@linkplain #get_effective_component get_effective_component}</th> 181: * <td>yes</td> 182: * <td bgcolor="lightgray">no </td> 183: * <td colspan="3" align ="center">yes</td> 184: * </tr> 185: * <tr> 186: * <th>{@linkplain #get_effective_components get_effective_components}</th> 187: * <td>yes</td> 188: * <td bgcolor="lightgray">no </td> 189: * <td colspan="3" align ="center">yes</td> 190: * </tr> 191: * <tr> 192: * <th>{@linkplain #get_request_policy get_request_policy}</th> 193: * <td>yes</td> 194: * <td bgcolor="lightgray">no </td> 195: * <td colspan="3" align ="center">yes</td> 196: * </tr> 197: * <tr> 198: * <th>{@linkplain #add_request_service_context add_request_service_context}</th> 199: * <td>yes</td> 200: * <td bgcolor="lightgray" colspan="4" align="center">no</td> 201: * </tr> 202: * <tr> 203: * <th></th> 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> 209: * </tr> 210: * </table> 211: * <ol> 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 217: * of 14.</a></li> 218: * </ol> 219: * 220: * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) 221: */ 222: public interface ClientRequestInfoOperations extends RequestInfoOperations 223: { 224: /** 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. 228: * 229: * @return the initial client invocation target. 230: * 231: * @see #effective_target() 232: */ 233: org.omg.CORBA.Object target(); 234: 235: /** 236: * Returns the object on that the operation will be invoked after handling the 237: * possible forwarding. 238: * 239: * @return the final invocation target. 240: * 241: * @see #target() 242: */ 243: org.omg.CORBA.Object effective_target(); 244: 245: /** 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 248: * message. 249: * 250: * @return the invocation IOR. 251: */ 252: TaggedProfile effective_profile(); 253: 254: /** 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. 258: * 259: * @param id the component id. 260: * 261: * @return the profile component with the given Id. 262: * 263: * @throws BAD_PARAM minor 28 in there are no any components with the given Id 264: * in the profile. 265: */ 266: TaggedComponent get_effective_component(int id) throws BAD_PARAM; 267: 268: /** 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. 271: * 272: * @param id the component id. 273: * 274: * @return the array of all profile components with the given Id. 275: * 276: * @throws BAD_PARAM minor 28 in there are no any components with the given Id 277: * in the profile. 278: */ 279: TaggedComponent[] get_effective_components(int id) throws BAD_PARAM; 280: 281: /** 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. 284: * 285: * @param type the type of the policy being requested. 286: * 287: * @return should return the policy that applies to this operation. 288: * 289: * @throws NO_IMPLEMENT always. 290: */ 291: Policy get_request_policy(int type) throws INV_POLICY; 292: 293: /** 294: * Returns the repository id of the remote exception that was thrown on the 295: * server side. 296: * 297: * @return the exception repository id. 298: * 299: * @see #received_exception() 300: */ 301: String received_exception_id(); 302: 303: /** 304: * Returns the remote exception that was thrown on the server side. 305: * 306: * @return the Any, holding this exception. 307: * 308: * @see #received_exception_id() 309: */ 310: Any received_exception(); 311: 312: /** 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}. 317: * 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. 321: * 322: * @throws BAD_INV_ORDER minor 15 if the context with the same Id already 323: * exists and replace=false. 324: */ 325: void add_request_service_context(ServiceContext service_context, 326: boolean replace 327: );
GNU Classpath (0.20) |