diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-11-23 13:28:08 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-11-23 13:28:08 +0100 |
commit | 2c578015edcb36cdc0acd0227295de1dcca1b995 (patch) | |
tree | e163980b5dabb43a40089a29fdf8ff47a3e07f1c /java/src/Ice/OnewayCallback.java | |
parent | no longer generating inspect method for each Ruby exception (diff) | |
download | ice-2c578015edcb36cdc0acd0227295de1dcca1b995.tar.bz2 ice-2c578015edcb36cdc0acd0227295de1dcca1b995.tar.xz ice-2c578015edcb36cdc0acd0227295de1dcca1b995.zip |
New AMI mapping
Diffstat (limited to 'java/src/Ice/OnewayCallback.java')
-rw-r--r-- | java/src/Ice/OnewayCallback.java | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/java/src/Ice/OnewayCallback.java b/java/src/Ice/OnewayCallback.java new file mode 100644 index 00000000000..c613a0fadae --- /dev/null +++ b/java/src/Ice/OnewayCallback.java @@ -0,0 +1,54 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +package Ice; + +/** + * Base class for generated oneway operation callback. + **/ +public abstract class OnewayCallback extends IceInternal.CallbackBase +{ + /** + * Called when the invocation response is received. + **/ + public abstract void response(); + + /** + * Called when the invocation raises an Ice run-time exception. + * + * @param ex The Ice run-time exception raised by the operation. + **/ + public abstract void exception(LocalException ex); + + /** + * Called when a queued invocation is sent successfully. + **/ + public void sent() + { + } + + public final void __sent(AsyncResult __result) + { + sent(); + } + + public final void __completed(AsyncResult __result) + { + try + { + ((ObjectPrxHelperBase)__result.getProxy()).__end(__result, __result.getOperation()); + } + catch(LocalException __ex) + { + exception(__ex); + return; + } + response(); + } +} |