diff options
Diffstat (limited to 'java/src/Ice/AMI_Object_ice_invoke.java')
-rw-r--r-- | java/src/Ice/AMI_Object_ice_invoke.java | 56 |
1 files changed, 15 insertions, 41 deletions
diff --git a/java/src/Ice/AMI_Object_ice_invoke.java b/java/src/Ice/AMI_Object_ice_invoke.java index 097ba8258c8..8b273f4caab 100644 --- a/java/src/Ice/AMI_Object_ice_invoke.java +++ b/java/src/Ice/AMI_Object_ice_invoke.java @@ -10,15 +10,12 @@ package Ice; /** - * Callback object for {@link Blobject} AMI invocations. - * - * @see Blobject + * Callback object for {@link ObjectPrx#.ice_invoke_async}. **/ -public abstract class AMI_Object_ice_invoke extends IceInternal.OutgoingAsync +public abstract class AMI_Object_ice_invoke extends Callback_Object_ice_invoke { /** - * The Ice run time calls <code>ice_response</code> when an asynchronous operation invocation - * completes successfully or raises a user exception. + * Called when an asynchronous operation invocation completes successfully or raises a user exception. * * @param ok Indicates the result of the invocation. If <code>true</code>, the operation * completed succesfully; if <code>false</code>, the operation raised a user exception. @@ -29,50 +26,27 @@ public abstract class AMI_Object_ice_invoke extends IceInternal.OutgoingAsync public abstract void ice_response(boolean ok, byte[] outParams); /** - * The Ice run time calls <code>ice_exception</code> when an asynchronous operation invocation - * raises an Ice run-time exception. + * Called when the invocation raises an Ice run-time exception. * - * @param ex The encoded Ice run-time exception raised by the operation. + * @param ex The Ice run-time exception raised by the operation. **/ public abstract void ice_exception(LocalException ex); - public final boolean __invoke(Ice.ObjectPrx prx, String operation, OperationMode mode, - byte[] inParams, java.util.Map<String, String> context) + public final void response(boolean ok, byte[] outParams) { - __acquireCallback(prx); - try - { - __prepare(prx, operation, mode, context); - if(inParams != null) - { - __os.writeBlob(inParams); - } - __os.endWriteEncaps(); - return __send(); - } - catch(LocalException ex) - { - __releaseCallback(ex); - return false; - } + ice_response(ok, outParams); } - protected final void __response(boolean ok) // ok == true means no user exception. + public final void exception(LocalException ex) { - byte[] outParams; - try - { - __is.startReadEncaps(); - int sz = __is.getReadEncapsSize(); - outParams = __is.readBlob(sz); - __is.endReadEncaps(); - } - catch(LocalException ex) + ice_exception(ex); + } + + public final void sent() + { + if(this instanceof AMISentCallback) { - __finished(ex); - return; + ((AMISentCallback)this).ice_sent(); } - ice_response(ok, outParams); - __releaseCallback(); } } |