summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-12-28 17:05:47 +0000
committerMarc Laukien <marc@zeroc.com>2002-12-28 17:05:47 +0000
commitfbbff6f71cf0aff52e94b03bbb09fc7ab9417452 (patch)
tree2ac5a36a425be7bd184dfaecec269430545da3f8 /java/src
parentmore ami (diff)
downloadice-fbbff6f71cf0aff52e94b03bbb09fc7ab9417452.tar.bz2
ice-fbbff6f71cf0aff52e94b03bbb09fc7ab9417452.tar.xz
ice-fbbff6f71cf0aff52e94b03bbb09fc7ab9417452.zip
more AMI
Diffstat (limited to 'java/src')
-rw-r--r--java/src/Ice/AMI_Object_ice_invoke.java39
-rw-r--r--java/src/Ice/ObjectPrxHelper.java30
-rw-r--r--java/src/Ice/_ObjectDel.java13
-rw-r--r--java/src/Ice/_ObjectDelD.java7
-rw-r--r--java/src/Ice/_ObjectDelM.java10
-rw-r--r--java/src/IceInternal/OutgoingAsync.java3
6 files changed, 94 insertions, 8 deletions
diff --git a/java/src/Ice/AMI_Object_ice_invoke.java b/java/src/Ice/AMI_Object_ice_invoke.java
new file mode 100644
index 00000000000..323a4946507
--- /dev/null
+++ b/java/src/Ice/AMI_Object_ice_invoke.java
@@ -0,0 +1,39 @@
+// **********************************************************************
+//
+// Copyright (c) 2002
+// ZeroC, Inc.
+// Billerica, MA, USA
+//
+// All Rights Reserved.
+//
+// Ice is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation.
+//
+// **********************************************************************
+
+package Ice;
+
+public abstract class AMI_Object_ice_invoke extends IceInternal.OutgoingAsync
+{
+
+ public abstract void ice_response(boolean ok, byte[] outParams);
+ public abstract void ice_exception(Ice.LocalException ex);
+
+ protected final void __response(boolean ok) // ok == true means no user exception.
+ {
+ byte[] outParams;
+ try
+ {
+ IceInternal.BasicStream __is = this.__is();
+ int sz = __is.getReadEncapsSize();
+ outParams = __is.readBlob(sz);
+ }
+ catch(LocalException ex)
+ {
+ ice_exception(ex);
+ return;
+ }
+ ice_response(ok, outParams);
+ }
+};
diff --git a/java/src/Ice/ObjectPrxHelper.java b/java/src/Ice/ObjectPrxHelper.java
index 46989a56d18..a4feb35c789 100644
--- a/java/src/Ice/ObjectPrxHelper.java
+++ b/java/src/Ice/ObjectPrxHelper.java
@@ -177,7 +177,7 @@ public class ObjectPrxHelper implements ObjectPrx
public final boolean
ice_invoke(String operation, OperationMode mode, byte[] inParams, ByteSeqHolder outParams,
- java.util.Map __context)
+ java.util.Map context)
{
int __cnt = 0;
while(true)
@@ -185,7 +185,7 @@ public class ObjectPrxHelper implements ObjectPrx
try
{
_ObjectDel __del = __getDelegate();
- return __del.ice_invoke(operation, mode, inParams, outParams, __context);
+ return __del.ice_invoke(operation, mode, inParams, outParams, context);
}
catch(IceInternal.NonRepeatable __ex)
{
@@ -205,6 +205,32 @@ public class ObjectPrxHelper implements ObjectPrx
}
}
+ public final void
+ ice_invoke_async(AMI_Object_ice_invoke cb, String operation, OperationMode mode, byte[] inParams)
+ {
+ ice_invoke_async(cb, operation, mode, inParams, null);
+ }
+
+ public final void
+ ice_invoke_async(AMI_Object_ice_invoke cb, String operation, OperationMode mode, byte[] inParams,
+ java.util.Map context)
+ {
+ int __cnt = 0;
+ while(true)
+ {
+ try
+ {
+ _ObjectDel __del = __getDelegate();
+ __del.ice_invoke_async(cb, operation, mode, inParams, context);
+ return;
+ }
+ catch(LocalException __ex)
+ {
+ __cnt = __handleException(__ex, __cnt);
+ }
+ }
+ }
+
public final Identity
ice_getIdentity()
{
diff --git a/java/src/Ice/_ObjectDel.java b/java/src/Ice/_ObjectDel.java
index 1d277eb9e24..7cab11e9372 100644
--- a/java/src/Ice/_ObjectDel.java
+++ b/java/src/Ice/_ObjectDel.java
@@ -16,24 +16,27 @@ package Ice;
public interface _ObjectDel
{
- boolean ice_isA(String __id, java.util.Map __context)
+ boolean ice_isA(String id, java.util.Map context)
throws IceInternal.NonRepeatable;
- void ice_ping(java.util.Map __context)
+ void ice_ping(java.util.Map context)
throws IceInternal.NonRepeatable;
- String[] ice_ids(java.util.Map __context)
+ String[] ice_ids(java.util.Map context)
throws IceInternal.NonRepeatable;
- String ice_id(java.util.Map __context)
+ String ice_id(java.util.Map context)
throws IceInternal.NonRepeatable;
- String[] ice_facets(java.util.Map __context)
+ String[] ice_facets(java.util.Map context)
throws IceInternal.NonRepeatable;
boolean ice_invoke(String operation, Ice.OperationMode mode, byte[] inParams, ByteSeqHolder outParams,
java.util.Map context)
throws IceInternal.NonRepeatable;
+ void ice_invoke_async(AMI_Object_ice_invoke cb, String operation, Ice.OperationMode mode, byte[] inParams,
+ java.util.Map context);
+
void ice_flush();
}
diff --git a/java/src/Ice/_ObjectDelD.java b/java/src/Ice/_ObjectDelD.java
index 518bcc697ee..1b858731776 100644
--- a/java/src/Ice/_ObjectDelD.java
+++ b/java/src/Ice/_ObjectDelD.java
@@ -126,6 +126,13 @@ public class _ObjectDelD implements _ObjectDel
}
public void
+ ice_invoke_async(AMI_Object_ice_invoke cb, String operation, Ice.OperationMode mode, byte[] inParams,
+ java.util.Map context)
+ {
+ throw new CollocationOptimizationException();
+ }
+
+ public void
ice_flush()
{
// Nothing to do for direct delegates.
diff --git a/java/src/Ice/_ObjectDelM.java b/java/src/Ice/_ObjectDelM.java
index 37c7dc17119..fbc3dff9656 100644
--- a/java/src/Ice/_ObjectDelM.java
+++ b/java/src/Ice/_ObjectDelM.java
@@ -141,6 +141,16 @@ public class _ObjectDelM implements _ObjectDel
}
public void
+ ice_invoke_async(AMI_Object_ice_invoke cb, String operation, Ice.OperationMode mode, byte[] inParams,
+ java.util.Map context)
+ {
+ cb.__setup(__connection, __reference, operation, mode, context);
+ IceInternal.BasicStream __os = cb.__os();
+ __os.writeBlob(inParams);
+ cb.__invoke();
+ }
+
+ public void
ice_flush()
{
__connection.flushBatchRequest();
diff --git a/java/src/IceInternal/OutgoingAsync.java b/java/src/IceInternal/OutgoingAsync.java
index 05a96d83b5b..f76d7e5bde6 100644
--- a/java/src/IceInternal/OutgoingAsync.java
+++ b/java/src/IceInternal/OutgoingAsync.java
@@ -24,7 +24,6 @@ public abstract class OutgoingAsync
}
public abstract void ice_exception(Ice.LocalException ex);
- public abstract void __response(boolean ok);
public void
__setup(Connection connection, Reference ref, String operation, Ice.OperationMode mode, java.util.Map context)
@@ -234,6 +233,8 @@ public abstract class OutgoingAsync
return _os;
}
+ protected abstract void __response(boolean ok);
+
private void
warning(Exception ex)
{