Dead
[official-gcc.git] / gomp-20050608-branch / libjava / classpath / org / omg / PortableInterceptor / RequestInfoOperations.java
blobf865a14d258dbe7eb9acc0140714c180d13fedb9
1 /* RequestInfoOperations.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)
9 any later version.
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
19 02110-1301 USA.
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.
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.TypeCode;
44 import org.omg.Dynamic.Parameter;
45 import org.omg.IOP.ServiceContext;
47 /**
48 * Defines operations that are applicable for both server and client request.
49 * The additional operations, specific to the server and client request are
50 * defined in the derived interfaces {@link ServerRequestInfoOperations} and
51 * {@link ClientRequestInfoOperations}.
53 * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
55 public interface RequestInfoOperations
57 /**
58 * Return the parameters of the operation being invoked.
60 * @return the array, containing parameters of the operations or an empty
61 * array for the operations with no parameters.
63 * @throws NO_RESOURCES if the parameters are not available. The parameters
64 * are only available for DII (via {@link org.omg.CORBA.Request} or DSI calls.
65 * They are not available for calls via IDL - generated stubs.
67 Parameter[] arguments();
69 /**
70 * Returns the names of all contexts of the operation being invoked.
72 * @return the array of strings, defining contexts.
74 * @throws NO_RESOURCES if the contexts are not available. The contexts are
75 * only available for DII (via {@link org.omg.CORBA.Request} or DSI calls.
76 * They are not available for calls via IDL - generated stubs.
78 String[] contexts();
80 /**
81 * Returns the typecodes, defining all exceptions that the operation may
82 * throw.
84 * @return the array of exception typecodes, empty array if the operation
85 * should not throw any exceptions.
87 * @throws NO_RESOURCES if the exception list is not available. This list is
88 * only available for DII (via {@link org.omg.CORBA.Request} or DSI calls and
89 * only on the client side. It is not available for calls via IDL - generated
90 * stubs or on the server side.
92 TypeCode[] exceptions();
94 /**
95 * If the request contains forwarding information (the reply_status attribute
96 * being LOCATION_FORWARD), return the forwarding target.
98 * @return the object where the request should be forwarded.
100 org.omg.CORBA.Object forward_reference();
103 * Get the service context with the given ctx_name that is associated with the
104 * reply.
106 * @param ctx_name the name of the service context
108 * @return the copy of the corresponding context.
110 * @throws BAD_PARAM minor 26, if the context with the give ctx_name does not
111 * exist.
113 ServiceContext get_reply_service_context(int ctx_name)
114 throws BAD_PARAM;
117 * Get the service context with the given ctx_name that is associated with the
118 * request.
120 * @param ctx_name the name of the service context
122 * @return the copy of the corresponding context.
124 * @throws BAD_PARAM minor 26, if the context with the give ctx_name does not
125 * exist.
127 ServiceContext get_request_service_context(int ctx_name)
128 throws BAD_PARAM;
131 * Get the data from the given slot of the PortableInterceptor.Current that is
132 * in the scope of the request.
134 Any get_slot(int id) throws InvalidSlot;
137 * Get the names of the service contexts being sent on the request.
139 * @return array of strings, naming the contexts.
141 String[] operation_context();
144 * Get the name of the operation being invoked.
146 * @return the name of the operation, usually the name of method being called.
148 String operation();
151 * Get the reoly state as result of the operation invocation.
153 * @return the value field of one of the following: {@link SUCCESSFUL},
154 * {@link SYSTEM_EXCEPTION}, {@link USER_EXCEPTION},
155 * {@link LOCATION_FORWARD} or {@link TRANSPORT_RETRY}.
157 short reply_status();
160 * Get the request id.
162 * @return an id that uniquely identifies the current request/reply sequence.
164 int request_id();
167 * Indicates whether request sender expected any response.
169 * @return true if the response was expected, false otherwise.
171 boolean response_expected();
174 * Get the result of the operation invocation.
176 * @return an Any, containing the value, returned by the performed operation.
178 Any result();
181 * Determines how far the request shall progress before control is returned to
182 * the client. However up till JDK 1.5 inclusive this method always returns
183 * SYNC_WITH_TRANSPORT.
185 * @return {@link org.omg.Messaging.SYNC_WITH_TRANSPORT.value (1), always.
187 * @specnote as defined in the Suns 1.5 JDK API.
189 short sync_scope();