diff options
author | Mark Spruiell <mes@zeroc.com> | 2010-05-13 19:05:05 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2010-05-13 19:05:05 -0700 |
commit | 308fa1d86c97997c2ec4b07671bbb113997a28cb (patch) | |
tree | f8c7dbd4b2f4f08bd78ee48d070efd2dd492b553 /java/src | |
parent | bug 4680 - improve IceStorm/clock demo docs (diff) | |
download | ice-308fa1d86c97997c2ec4b07671bbb113997a28cb.tar.bz2 ice-308fa1d86c97997c2ec4b07671bbb113997a28cb.tar.xz ice-308fa1d86c97997c2ec4b07671bbb113997a28cb.zip |
bug 4716 - java async API inconsistency
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/Ice/AsyncCallback.java | 30 | ||||
-rw-r--r-- | java/src/Ice/Callback.java | 30 | ||||
-rw-r--r-- | java/src/IceInternal/CommunicatorBatchOutgoingAsync.java | 2 |
3 files changed, 33 insertions, 29 deletions
diff --git a/java/src/Ice/AsyncCallback.java b/java/src/Ice/AsyncCallback.java index f8a5811cb20..89fd3735bb0 100644 --- a/java/src/Ice/AsyncCallback.java +++ b/java/src/Ice/AsyncCallback.java @@ -13,35 +13,9 @@ package Ice; * An application can optionally supply an instance of this class in an * asynchronous invocation. The application must create a subclass and * implement the completed method. + * + * @deprecated This class is deprecated, use Ice.Callback instead. **/ public abstract class AsyncCallback extends Callback { - /** - * Invoked when the invocation completes. The subclass should - * call the matching <code>end_OP</code> method on the proxy and - * must be prepared to handle exceptions. - * - * @param r The asynchronous result object returned by the <code>begin_OP</code> method. - **/ - public abstract void completed(AsyncResult r); - - /** - * Invoked when the Ice run time has passed the outgoing message - * buffer to the transport. - * - * @param r The asynchronous result object returned by the <code>begin_OP</code> method. - **/ - public void sent(AsyncResult r) - { - } - - public final void __completed(AsyncResult r) - { - completed(r); - } - - public final void __sent(AsyncResult r) - { - sent(r); - } } diff --git a/java/src/Ice/Callback.java b/java/src/Ice/Callback.java index 24c3004767a..debd4f55f96 100644 --- a/java/src/Ice/Callback.java +++ b/java/src/Ice/Callback.java @@ -16,4 +16,34 @@ package Ice; **/ public abstract class Callback extends IceInternal.CallbackBase { + /** + * Invoked when the invocation completes. The subclass should + * call the matching <code>end_OP</code> method on the proxy and + * must be prepared to handle exceptions. + * + * @param r The asynchronous result object returned by the <code>begin_OP</code> method. + **/ + public abstract void completed(AsyncResult r); + + /** + * Invoked when the Ice run time has passed the outgoing message + * buffer to the transport. The default implementation does nothing, + * a subclass can override it if it needs to take action when the + * message is successfully sent. + * + * @param r The asynchronous result object returned by the <code>begin_OP</code> method. + **/ + public void sent(AsyncResult r) + { + } + + public final void __completed(AsyncResult r) + { + completed(r); + } + + public final void __sent(AsyncResult r) + { + sent(r); + } } diff --git a/java/src/IceInternal/CommunicatorBatchOutgoingAsync.java b/java/src/IceInternal/CommunicatorBatchOutgoingAsync.java index 2ded9a70832..ec5b12f8a63 100644 --- a/java/src/IceInternal/CommunicatorBatchOutgoingAsync.java +++ b/java/src/IceInternal/CommunicatorBatchOutgoingAsync.java @@ -117,7 +117,7 @@ public class CommunicatorBatchOutgoingAsync extends BatchOutgoingAsync private Ice.Communicator _communicator; private int _useCount; - private Ice.AsyncCallback _cb = new Ice.AsyncCallback() + private Ice.Callback _cb = new Ice.Callback() { @Override public void completed(Ice.AsyncResult r) |