summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-23 21:31:04 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-23 21:31:04 +0000
commit947b8814056ea2fba6bbcfab86591f74bffc0311 (patch)
tree3ca4b2e68dc14c3128b9c781d23f1d0b1f2bee49 /libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java
parent49792907376493f0939563eb0219b96a48f1ae3b (diff)
downloadppe42-gcc-947b8814056ea2fba6bbcfab86591f74bffc0311.tar.gz
ppe42-gcc-947b8814056ea2fba6bbcfab86591f74bffc0311.zip
Imported Classpath 0.18.
* sources.am, Makefile.in: Updated. * Makefile.am (nat_source_files): Removed natProxy.cc. * java/lang/reflect/natProxy.cc: Removed. * gnu/classpath/jdwp/VMFrame.java, gnu/classpath/jdwp/VMIdManager.java, gnu/classpath/jdwp/VMVirtualMachine.java, java/lang/reflect/VMProxy.java: New files. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * scripts/makemake.tcl (verbose): Add gnu/java/awt/peer/qt to BC list. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/java/net/DefaultContentHandlerFactory.java (getContent): Remove ClasspathToolkit references. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/awt/xlib/XCanvasPeer.java: Add new peer methods. * gnu/awt/xlib/XFramePeer.java: Likewise. * gnu/awt/xlib/XGraphicsConfiguration.java: Likewise. 2005-09-23 Thomas Fitzsimmons <fitzsim@redhat.com> * Makefile.am (libgcjawt_la_SOURCES): Remove jawt.c. Add classpath/native/jawt/jawt.c. * Makefile.in: Regenerate. * jawt.c: Remove file. * include/Makefile.am (tool_include__HEADERS): Remove jawt.h and jawt_md.h. Add ../classpath/include/jawt.h and ../classpath/include/jawt_md.h. * include/Makefile.in: Regenerate. * include/jawt.h: Regenerate. * include/jawt_md.h: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104586 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java')
-rw-r--r--libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java37
1 files changed, 23 insertions, 14 deletions
diff --git a/libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java b/libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java
index 0b698818215..7f40fc84d2d 100644
--- a/libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java
+++ b/libjava/classpath/gnu/CORBA/ServiceRequestAdapter.java
@@ -53,10 +53,11 @@ import org.omg.CORBA.portable.ResponseHandler;
import org.omg.CORBA.portable.Streamable;
/**
- * This class exists to handle obsolete invocation style using
- * ServerRequest.
- *
- * @deprecated The method {@link ObjectImpl#_invoke} is much faster.
+ * This class supports invocation using ServerRequest. When possible,
+ * it is better to use the {@link ObjectImpl#_invoke} rather than
+ * working via ServerRequest. However since 1.4 the ServerRequest is
+ * involved into POA machinery making this type of call is sometimes
+ * inavoidable.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
@@ -86,13 +87,13 @@ public class ServiceRequestAdapter
}
/**
- * The old style invocation using the currently deprecated server
- * request class.
+ * Make an invocation.
*
* @param request a server request, containg the invocation information.
* @param target the invocation target
- * @param result the result holder with the set suitable streamable to read
- * the result or null for void.
+ * @param result the result holder with the set suitable streamable.
+ * Using this parameter only increase the performance. It can be
+ * null if the return type is void or unknown.
*/
public static void invoke(ServerRequest request, InvokeHandler target,
Streamable result
@@ -133,12 +134,20 @@ public class ServiceRequestAdapter
else
{
if (result != null)
- {
- result._read(in);
- gnuAny r = new gnuAny();
- r.insert_Streamable(result);
- request.set_result(r);
- };
+ {
+ // Use the holder for the return value, if provided.
+ result._read(in);
+
+ gnuAny r = new gnuAny();
+ r.insert_Streamable(result);
+ request.set_result(r);
+ }
+ else
+ {
+ // Use the universal holder otherwise.
+ gnuAny r = new gnuAny();
+ r.insert_Streamable(new streamReadyHolder(in));
+ }
// Unpack the arguments
for (int i = 0; i < args.count(); i++)
OpenPOWER on IntegriCloud