diff options
author | Jose <jose@zeroc.com> | 2014-04-18 21:44:03 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2014-04-18 21:44:03 +0200 |
commit | 8324b6221eaf415dd482453a4bbca872e5a8e1af (patch) | |
tree | b9a7a8783c81d0fcac2c2545bfdb42d8dc53b569 /java/src | |
parent | Fixed (ICE-4858) - Eliminate IceDB (diff) | |
download | ice-8324b6221eaf415dd482453a4bbca872e5a8e1af.tar.bz2 ice-8324b6221eaf415dd482453a4bbca872e5a8e1af.tar.xz ice-8324b6221eaf415dd482453a4bbca872e5a8e1af.zip |
Fixed (ICE-5507) - Support Java 8 lambda expression
Diffstat (limited to 'java/src')
60 files changed, 2200 insertions, 66 deletions
diff --git a/java/src/Ice/Callback_Object_ice_id.java b/java/src/Ice/Callback_Object_ice_id.java index 7a735dfbacf..1865cd08934 100644 --- a/java/src/Ice/Callback_Object_ice_id.java +++ b/java/src/Ice/Callback_Object_ice_id.java @@ -12,7 +12,8 @@ package Ice; /** * Callback object for {@link ObjectPrx#.begin_ice_id}. **/ -public abstract class Callback_Object_ice_id extends TwowayCallback +public abstract class Callback_Object_ice_id extends IceInternal.TwowayCallback + implements Ice.TwowayCallbackArg1<String> { /** * Called when the invocation completes successfully. @@ -23,16 +24,6 @@ public abstract class Callback_Object_ice_id extends TwowayCallback public final void __completed(AsyncResult __result) { - String __ret = null; - try - { - __ret = __result.getProxy().end_ice_id(__result); - } - catch(LocalException __ex) - { - exception(__ex); - return; - } - response(__ret); + ObjectPrxHelperBase.__ice_id_completed(this, __result); } } diff --git a/java/src/Ice/Callback_Object_ice_ids.java b/java/src/Ice/Callback_Object_ice_ids.java index d057d8b4f2b..efb57f86865 100644 --- a/java/src/Ice/Callback_Object_ice_ids.java +++ b/java/src/Ice/Callback_Object_ice_ids.java @@ -12,7 +12,8 @@ package Ice; /** * Callback object for {@link ObjectPrx#.begin_ice_ids}. **/ -public abstract class Callback_Object_ice_ids extends TwowayCallback +public abstract class Callback_Object_ice_ids extends IceInternal.TwowayCallback + implements Ice.TwowayCallbackArg1<String[]> { /** * Called when the invocation completes successfully. @@ -23,16 +24,6 @@ public abstract class Callback_Object_ice_ids extends TwowayCallback public final void __completed(AsyncResult __result) { - String[] __ret = null; - try - { - __ret = __result.getProxy().end_ice_ids(__result); - } - catch(LocalException __ex) - { - exception(__ex); - return; - } - response(__ret); + ObjectPrxHelperBase.__ice_ids_completed(this, __result); } } diff --git a/java/src/Ice/Callback_Object_ice_invoke.java b/java/src/Ice/Callback_Object_ice_invoke.java index 88174142b1c..49952389fd3 100644 --- a/java/src/Ice/Callback_Object_ice_invoke.java +++ b/java/src/Ice/Callback_Object_ice_invoke.java @@ -12,7 +12,8 @@ package Ice; /** * Callback object for {@link ObjectPrx#.begin_ice_invoke}. **/ -public abstract class Callback_Object_ice_invoke extends TwowayCallback +public abstract class Callback_Object_ice_invoke + extends IceInternal.TwowayCallback implements _Callback_Object_ice_invoke { /** * The Ice run time calls <code>response</code> when an asynchronous operation invocation @@ -24,21 +25,10 @@ public abstract class Callback_Object_ice_invoke extends TwowayCallback * is <code>true</code>; otherwise, if <code>ok</code> is <code>false</code>, contains the * encoded user exception raised by the operation. **/ - public abstract void response(boolean __ret, byte[] outParams); + public abstract void response(boolean ret, byte[] outParams); public final void __completed(AsyncResult __result) { - ByteSeqHolder outParams = new ByteSeqHolder(); - boolean __ret = false; - try - { - __ret = __result.getProxy().end_ice_invoke(outParams, __result); - } - catch(LocalException __ex) - { - exception(__ex); - return; - } - response(__ret, outParams.value); + ObjectPrxHelperBase.__ice_invoke_completed(this, __result); } } diff --git a/java/src/Ice/Callback_Object_ice_isA.java b/java/src/Ice/Callback_Object_ice_isA.java index cd16d4f62a7..77be0888112 100644 --- a/java/src/Ice/Callback_Object_ice_isA.java +++ b/java/src/Ice/Callback_Object_ice_isA.java @@ -12,7 +12,7 @@ package Ice; /** * Callback object for {@link ObjectPrx#.begin_ice_isA}. **/ -public abstract class Callback_Object_ice_isA extends TwowayCallback +public abstract class Callback_Object_ice_isA extends IceInternal.TwowayCallback implements Ice.TwowayCallbackBool { /** * Called when the invocation completes successfully. @@ -23,16 +23,6 @@ public abstract class Callback_Object_ice_isA extends TwowayCallback public final void __completed(AsyncResult __result) { - boolean __ret = false; - try - { - __ret = __result.getProxy().end_ice_isA(__result); - } - catch(LocalException __ex) - { - exception(__ex); - return; - } - response(__ret); + ObjectPrxHelperBase.__ice_isA_completed(this, __result); } } diff --git a/java/src/Ice/CommunicatorI.java b/java/src/Ice/CommunicatorI.java index 7472d61183b..2e4bbdbf855 100644 --- a/java/src/Ice/CommunicatorI.java +++ b/java/src/Ice/CommunicatorI.java @@ -206,6 +206,28 @@ public final class CommunicatorI implements Communicator { return begin_flushBatchRequestsInternal(cb); } + + public AsyncResult + begin_flushBatchRequests(IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __localExceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_flushBatchRequestsInternal( + new IceInternal.Functional_CallbackBase(false, __localExceptionCb, __sentCb) + { + public final void __completed(AsyncResult __result) + { + try + { + __result.getCommunicator().end_flushBatchRequests(__result); + } + catch(LocalException __ex) + { + __localExceptionCb.apply(__ex); + } + } + }); + } private static final String __flushBatchRequests_name = "flushBatchRequests"; diff --git a/java/src/Ice/ConnectionI.java b/java/src/Ice/ConnectionI.java index 5392a5db616..7785c2d2226 100644 --- a/java/src/Ice/ConnectionI.java +++ b/java/src/Ice/ConnectionI.java @@ -671,6 +671,28 @@ public final class ConnectionI extends IceInternal.EventHandler implements Conne { return begin_flushBatchRequestsInternal(cb); } + + public AsyncResult + begin_flushBatchRequests(IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __localExceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_flushBatchRequestsInternal( + new IceInternal.Functional_CallbackBase(false, __localExceptionCb, __sentCb) + { + public final void __completed(AsyncResult __result) + { + try + { + __result.getConnection().end_flushBatchRequests(__result); + } + catch(LocalException __ex) + { + __localExceptionCb.apply(__ex); + } + } + }); + } private Ice.AsyncResult begin_flushBatchRequestsInternal(IceInternal.CallbackBase cb) diff --git a/java/src/Ice/ObjectPrx.java b/java/src/Ice/ObjectPrx.java index 46ba68f81da..53031953f41 100644 --- a/java/src/Ice/ObjectPrx.java +++ b/java/src/Ice/ObjectPrx.java @@ -96,6 +96,58 @@ public interface ObjectPrx * @return The asynchronous result object. **/ AsyncResult begin_ice_isA(String __id, java.util.Map<String, String> __context, Callback_Object_ice_isA __cb); + + /** + * Tests whether this proxy supports a given interface. + * + * @param __id The Slice type ID of an interface. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_isA(String __id, IceInternal.Functional_BoolCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb); + + /** + * Tests whether this proxy supports a given interface. + * + * @param __id The Slice type ID of an interface. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_isA(String __id, IceInternal.Functional_BoolCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb); + + /** + * Tests whether this proxy supports a given interface. + * + * @param __id The Slice type ID of an interface. + * @param __context The <code>Context</code> map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_isA(String __id, java.util.Map<String, String> __context, + IceInternal.Functional_BoolCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb); + + /** + * Tests whether this proxy supports a given interface. + * + * @param __id The Slice type ID of an interface. + * @param __context The <code>Context</code> map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_isA(String __id, java.util.Map<String, String> __context, + IceInternal.Functional_BoolCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb); /** * Completes the asynchronous ice_isA request. @@ -165,6 +217,54 @@ public interface ObjectPrx * @return The asynchronous result object. **/ AsyncResult begin_ice_ping(java.util.Map<String, String> __context, Callback_Object_ice_ping __cb); + + /** + * Tests whether the target object of this proxy can be reached. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_ping(IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb); + + /** + * Tests whether the target object of this proxy can be reached. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_ping(IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb); + + /** + * Tests whether the target object of this proxy can be reached. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_ping(java.util.Map<String, String> __context, + IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb); + + /** + * Tests whether the target object of this proxy can be reached. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_ping(java.util.Map<String, String> __context, + IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb); /** * Completes the asynchronous ice_ping request. @@ -238,6 +338,54 @@ public interface ObjectPrx * @return The asynchronous result object. **/ AsyncResult begin_ice_ids(java.util.Map<String, String> __context, Callback_Object_ice_ids __cb); + + /** + * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb); + + /** + * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb); + + /** + * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_ids(java.util.Map<String, String> __context, + IceInternal.Functional_GenericCallback1<String[]> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb); + + /** + * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_ids(java.util.Map<String, String> __context, + IceInternal.Functional_GenericCallback1<String[]> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb); /** * Completes the asynchronous ice_ids request. @@ -311,6 +459,54 @@ public interface ObjectPrx * @return The asynchronous result object. **/ AsyncResult begin_ice_id(java.util.Map<String, String> __context, Callback_Object_ice_id __cb); + + /** + * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_id(IceInternal.Functional_GenericCallback1<String> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb); + + /** + * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_id(IceInternal.Functional_GenericCallback1<String> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb); + + /** + * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_id(java.util.Map<String, String> __context, + IceInternal.Functional_GenericCallback1<String> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb); + + /** + * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_id(java.util.Map<String, String> __context, + IceInternal.Functional_GenericCallback1<String> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb); /** * Completes the asynchronous ice_id request. @@ -453,6 +649,91 @@ public interface ObjectPrx **/ AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, java.util.Map<String, String> __context, Callback_Object_ice_invoke __cb); + + public interface FunctionalCallback_Object_ice_invoke_Response + { + void apply(boolean result, byte[] outArgs); + } + + /** + * Invokes an operation dynamically and asynchronously. + * + * @param operation The name of the operation to invoke. + * @param mode The operation mode (normal or idempotent). + * @param inParams The encoded in-parameters for the operation. + * for the operation. The return value follows any out-parameters. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + * + * @see Blobject + * @see OperationMode + **/ + AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, + FunctionalCallback_Object_ice_invoke_Response __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb); + + /** + * Invokes an operation dynamically and asynchronously. + * + * @param operation The name of the operation to invoke. + * @param mode The operation mode (normal or idempotent). + * @param inParams The encoded in-parameters for the operation. + * for the operation. The return value follows any out-parameters. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + * + * @see Blobject + * @see OperationMode + **/ + AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, + FunctionalCallback_Object_ice_invoke_Response __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb); + + /** + * Invokes an operation dynamically and asynchronously. + * + * @param operation The name of the operation to invoke. + * @param mode The operation mode (normal or idempotent). + * @param inParams The encoded in-parameters for the operation. + * @param __context The context map for the invocation. + * for the operation. The return value follows any out-parameters. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + * + * @see Blobject + * @see OperationMode + **/ + AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, + java.util.Map<String, String> __context, + FunctionalCallback_Object_ice_invoke_Response __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb); + + /** + * Invokes an operation dynamically and asynchronously. + * + * @param operation The name of the operation to invoke. + * @param mode The operation mode (normal or idempotent). + * @param inParams The encoded in-parameters for the operation. + * @param __context The context map for the invocation. + * for the operation. The return value follows any out-parameters. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + * + * @see Blobject + * @see OperationMode + **/ + AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, + java.util.Map<String, String> __context, + FunctionalCallback_Object_ice_invoke_Response __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb); /** * Completes the asynchronous ice_invoke request. @@ -887,6 +1168,16 @@ public interface ObjectPrx * @return The asynchronous result object. **/ AsyncResult begin_ice_flushBatchRequests(Callback_Object_ice_flushBatchRequests __cb); + + /** + * Asynchronously flushes any pending batched requests for this communicator. The call does not block. + * + * @param __cb The callback object to notify the application when the flush is complete. + * @return The asynchronous result object. + **/ + AsyncResult begin_ice_flushBatchRequests(IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb); /** * Completes the asynchronous flush request. diff --git a/java/src/Ice/ObjectPrxHelperBase.java b/java/src/Ice/ObjectPrxHelperBase.java index c5b2a83146f..b12b0d5dfbd 100644 --- a/java/src/Ice/ObjectPrxHelperBase.java +++ b/java/src/Ice/ObjectPrxHelperBase.java @@ -194,6 +194,96 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable { return begin_ice_isA(__id, __context, true, __cb); } + + /** + * Tests whether this proxy supports a given interface. + * + * @param __id The Slice type ID of an interface. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_isA(String __id, + IceInternal.Functional_BoolCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb) + { + return begin_ice_isA(__id, null, false, __responseCb, __exceptionCb, null); + } + + /** + * Tests whether this proxy supports a given interface. + * + * @param __id The Slice type ID of an interface. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_isA(String __id, + IceInternal.Functional_BoolCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_ice_isA(__id, null, false, __responseCb, __exceptionCb, __sentCb); + } + + /** + * Tests whether this proxy supports a given interface. + * + * @param __id The Slice type ID of an interface. + * @param __context The <code>Context</code> map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_isA(String __id, + java.util.Map<String, String> __context, + IceInternal.Functional_BoolCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb) + { + return begin_ice_isA(__id, __context, true, __responseCb, __exceptionCb, null); + } + + /** + * Tests whether this proxy supports a given interface. + * + * @param __id The Slice type ID of an interface. + * @param __context The <code>Context</code> map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_isA(String __id, + java.util.Map<String, String> __context, + IceInternal.Functional_BoolCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_ice_isA(__id, __context, true, __responseCb, __exceptionCb, __sentCb); + } + + private final AsyncResult + begin_ice_isA(String __id, + java.util.Map<String, String> __context, + boolean __explicitCtx, + IceInternal.Functional_BoolCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_ice_isA(__id, __context, __explicitCtx, + new IceInternal.Functional_TwowayCallbackBool(__responseCb, __exceptionCb, __sentCb) + { + public final void __completed(AsyncResult __result) + { + ObjectPrxHelperBase.__ice_isA_completed(this, __result); + } + }); + } private AsyncResult begin_ice_isA(String __id, java.util.Map<String, String> __context, boolean __explicitCtx, @@ -256,6 +346,21 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable throw ex; } } + + static public final void __ice_isA_completed(TwowayCallbackBool __cb, Ice.AsyncResult __result) + { + boolean __ret = false; + try + { + __ret = __result.getProxy().end_ice_isA(__result); + } + catch(LocalException __ex) + { + __cb.exception(__ex); + return; + } + __cb.response(__ret); + } /** * Tests whether the target object of this proxy can be reached. @@ -391,6 +496,74 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable { return begin_ice_ping(__context, true, __cb); } + + /** + * Tests whether the target object of this proxy can be reached. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_ping(IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb) + { + return begin_ice_ping(null, false, + new IceInternal.Functional_OnewayCallback(__responseCb, __exceptionCb, null)); + } + + /** + * Tests whether the target object of this proxy can be reached. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_ping(IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_ice_ping(null, false, new + IceInternal.Functional_OnewayCallback(__responseCb, __exceptionCb, __sentCb)); + } + + /** + * Tests whether the target object of this proxy can be reached. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_ping(java.util.Map<String, String> __context, + IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb) + { + return begin_ice_ping(__context, true, + new IceInternal.Functional_OnewayCallback(__responseCb, __exceptionCb, null)); + } + + /** + * Tests whether the target object of this proxy can be reached. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_ping(java.util.Map<String, String> __context, + IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_ice_ping(__context, true, + new IceInternal.Functional_OnewayCallback(__responseCb, __exceptionCb, __sentCb)); + } private AsyncResult begin_ice_ping(java.util.Map<String, String> __context, boolean __explicitCtx, IceInternal.CallbackBase __cb) @@ -559,6 +732,105 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable { return begin_ice_ids(__context, true, __cb); } + + class FunctionalCallback_Object_ice_ids extends IceInternal.Functional_TwowayCallbackArg1<String[]> + { + FunctionalCallback_Object_ice_ids(IceInternal.Functional_GenericCallback1<String[]> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + super(__responseCb, __exceptionCb, __sentCb); + } + + public final void __completed(AsyncResult __result) + { + ObjectPrxHelperBase.__ice_ids_completed(this, __result); + } + } + + /** + * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb) + { + return begin_ice_ids(null, false, new FunctionalCallback_Object_ice_ids(__responseCb, __exceptionCb, null)); + } + + /** + * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_ids(IceInternal.Functional_GenericCallback1<String[]> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_ice_ids(null, false, + new FunctionalCallback_Object_ice_ids(__responseCb, __exceptionCb, __sentCb)); + } + + /** + * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_ids(java.util.Map<String, String> __context, + IceInternal.Functional_GenericCallback1<String[]> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb) + { + return begin_ice_ids(__context, true, + new FunctionalCallback_Object_ice_ids(__responseCb, __exceptionCb, null)); + } + + /** + * Returns the Slice type IDs of the interfaces supported by the target object of this proxy. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_ids(java.util.Map<String, String> __context, + IceInternal.Functional_GenericCallback1<String[]> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_ice_ids(__context, true, + new FunctionalCallback_Object_ice_ids(__responseCb, __exceptionCb, __sentCb)); + } + + private final AsyncResult + begin_ice_ids(java.util.Map<String, String> __context, + boolean __explicitCtx, + IceInternal.Functional_GenericCallback1<String[]> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_ice_ids(__context, true, + new IceInternal.Functional_TwowayCallbackArg1<String[]>(__responseCb, __exceptionCb, __sentCb) + { + public final void __completed(AsyncResult __result) + { + ObjectPrxHelperBase.__ice_ids_completed(this, __result); + } + }); + } private AsyncResult begin_ice_ids(java.util.Map<String, String> __context, boolean __explicitCtx, IceInternal.CallbackBase __cb) @@ -619,6 +891,21 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable throw ex; } } + + static public final void __ice_ids_completed(TwowayCallbackArg1<String[]> __cb, AsyncResult __result) + { + String[] __ret = null; + try + { + __ret = __result.getProxy().end_ice_ids(__result); + } + catch(LocalException __ex) + { + __cb.exception(__ex); + return; + } + __cb.response(__ret); + } /** * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. @@ -757,6 +1044,86 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable { return begin_ice_id(__context, true, __cb); } + + class FunctionalCallback_Object_ice_id extends IceInternal.Functional_TwowayCallbackArg1<String> + { + FunctionalCallback_Object_ice_id(IceInternal.Functional_GenericCallback1<String> responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) + { + super(responseCb, exceptionCb, sentCb); + } + + public final void __completed(AsyncResult __result) + { + ObjectPrxHelperBase.__ice_id_completed(this, __result); + } + } + + /** + * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_id(IceInternal.Functional_GenericCallback1<String> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb) + { + return begin_ice_id(null, false, new FunctionalCallback_Object_ice_id(__responseCb, __exceptionCb, null)); + } + + /** + * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. + * + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_id(IceInternal.Functional_GenericCallback1<String> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_ice_id(null, false, new FunctionalCallback_Object_ice_id(__responseCb, __exceptionCb, __sentCb)); + } + + /** + * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_id(java.util.Map<String, String> __context, + IceInternal.Functional_GenericCallback1<String> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb) + { + return begin_ice_id(__context, true, new FunctionalCallback_Object_ice_id(__responseCb, __exceptionCb, null)); + } + + /** + * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy. + * + * @param __context The context map for the invocation. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + **/ + public final AsyncResult + begin_ice_id(java.util.Map<String, String> __context, + IceInternal.Functional_GenericCallback1<String> __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_ice_id(__context, true, + new FunctionalCallback_Object_ice_id(__responseCb, __exceptionCb, __sentCb)); + } private AsyncResult begin_ice_id(java.util.Map<String, String> __context, boolean __explicitCtx, IceInternal.CallbackBase __cb) @@ -816,6 +1183,21 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable throw ex; } } + + static public final void __ice_id_completed(TwowayCallbackArg1<String> __cb, AsyncResult __result) + { + String __ret = null; + try + { + __ret = __result.getProxy().end_ice_id(__result); + } + catch(LocalException __ex) + { + __cb.exception(__ex); + return; + } + __cb.response(__ret); + } /** * Invoke an operation dynamically. @@ -1028,6 +1410,131 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable { return begin_ice_invoke(operation, mode, inParams, __context, true, __cb); } + + /** + * Invokes an operation dynamically and asynchronously. + * + * @param operation The name of the operation to invoke. + * @param mode The operation mode (normal or idempotent). + * @param inParams The encoded in-parameters for the operation. + * for the operation. The return value follows any out-parameters. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + * + * @see Blobject + * @see OperationMode + **/ + public final AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) + { + return begin_ice_invoke(operation, mode, inParams, null, false, responseCb, exceptionCb, sentCb); + } + + /** + * Invokes an operation dynamically and asynchronously. + * + * @param operation The name of the operation to invoke. + * @param mode The operation mode (normal or idempotent). + * @param inParams The encoded in-parameters for the operation. + * for the operation. The return value follows any out-parameters. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + * + * @see Blobject + * @see OperationMode + **/ + public final AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> exceptionCb) + { + return begin_ice_invoke(operation, mode, inParams, null, false, responseCb, exceptionCb, null); + } + + /** + * Invokes an operation dynamically and asynchronously. + * + * @param operation The name of the operation to invoke. + * @param mode The operation mode (normal or idempotent). + * @param inParams The encoded in-parameters for the operation. + * @param __context The context map for the invocation. + * for the operation. The return value follows any out-parameters. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @param __sentCb The asynchronous sent callback object. + * @return The asynchronous result object. + * + * @see Blobject + * @see OperationMode + **/ + public final AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, + java.util.Map<String, String> context, + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) + { + return begin_ice_invoke(operation, mode, inParams, context, true, responseCb, exceptionCb, sentCb); + } + + /** + * Invokes an operation dynamically and asynchronously. + * + * @param operation The name of the operation to invoke. + * @param mode The operation mode (normal or idempotent). + * @param inParams The encoded in-parameters for the operation. + * @param __context The context map for the invocation. + * for the operation. The return value follows any out-parameters. + * @param __responseCb The asynchronous response callback object. + * @param __exceptionCb The asynchronous exception callback object. + * @return The asynchronous result object. + * + * @see Blobject + * @see OperationMode + **/ + public final AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, + java.util.Map<String, String> context, + FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> exceptionCb) + { + return begin_ice_invoke(operation, mode, inParams, context, true, responseCb, exceptionCb, null); + } + + private final AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, + java.util.Map<String, String> __context, + boolean __explicitCtx, + FunctionalCallback_Object_ice_invoke_Response __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + class CB extends IceInternal.Functional_TwowayCallback implements _Callback_Object_ice_invoke + { + CB(FunctionalCallback_Object_ice_invoke_Response responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> exceptionCb, + IceInternal.Functional_BoolCallback sentCb) + { + super(responseCb != null, exceptionCb, sentCb); + __responseCb = responseCb; + } + + public void response(boolean __ret, byte[] outParams) + { + __responseCb.apply(__ret, outParams); + } + + public final void __completed(AsyncResult __result) + { + ObjectPrxHelperBase.__ice_invoke_completed(this, __result); + } + + FunctionalCallback_Object_ice_invoke_Response __responseCb; + } + return begin_ice_invoke(operation, mode, inParams, __context, __explicitCtx, + new CB(__responseCb, __exceptionCb, __sentCb)); + } private AsyncResult begin_ice_invoke(String operation, OperationMode mode, byte[] inParams, java.util.Map<String, String> __context, @@ -1084,6 +1591,22 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable } return ok; } + + public static void __ice_invoke_completed(_Callback_Object_ice_invoke __cb, AsyncResult __result) + { + ByteSeqHolder outParams = new ByteSeqHolder(); + boolean __ret = false; + try + { + __ret = __result.getProxy().end_ice_invoke(outParams, __result); + } + catch(LocalException __ex) + { + __cb.exception(__ex); + return; + } + __cb.response(__ret, outParams.value); + } /** * Invokes an operation dynamically and asynchronously. @@ -1948,6 +2471,23 @@ public class ObjectPrxHelperBase implements ObjectPrx, java.io.Serializable AsyncResult result = begin_ice_flushBatchRequestsInternal(__cb); return result; } + + /** + * Asynchronously flushes any pending batched requests for this communicator. The call does not block. + * + * @param __exceptionCb The callback object to notify the application when the there is an exception flushing + * the requests. + * @param __sentCb The callback object to notify the application when the flush is complete. + * @return The asynchronous result object. + **/ + public AsyncResult + begin_ice_flushBatchRequests(IceInternal.Functional_VoidCallback __responseCb, + IceInternal.Functional_GenericCallback1<Ice.LocalException> __exceptionCb, + IceInternal.Functional_BoolCallback __sentCb) + { + return begin_ice_flushBatchRequestsInternal( + new IceInternal.Functional_OnewayCallback(__responseCb, __exceptionCb, __sentCb)); + } private static final String __ice_flushBatchRequests_name = "ice_flushBatchRequests"; diff --git a/java/src/Ice/TwowayCallback.java b/java/src/Ice/TwowayCallback.java index b2553339ca2..a5d5928e769 100644 --- a/java/src/Ice/TwowayCallback.java +++ b/java/src/Ice/TwowayCallback.java @@ -10,26 +10,14 @@ package Ice; /** - * Base class for generated twoway operation callback. + * Base interface for generated twoway operation callback. **/ -public abstract class TwowayCallback extends IceInternal.CallbackBase +public interface TwowayCallback { /** * Called when the invocation raises an Ice run-time exception. * - * @param __ex The Ice run-time exception raised by the operation. + * @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(boolean sentSynchronously) - { - } - - public final void __sent(AsyncResult __result) - { - sent(__result.sentSynchronously()); - } + public void exception(LocalException __ex); } diff --git a/java/src/Ice/TwowayCallbackArg1.java b/java/src/Ice/TwowayCallbackArg1.java new file mode 100644 index 00000000000..9bf7dacae1d --- /dev/null +++ b/java/src/Ice/TwowayCallbackArg1.java @@ -0,0 +1,20 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackArg1<T> extends TwowayCallback +{ + /** + * Called when the invocation response is received. + * + * @param arg The operation return value. + **/ + void response(T arg); +}; diff --git a/java/src/Ice/TwowayCallbackArg1UE.java b/java/src/Ice/TwowayCallbackArg1UE.java new file mode 100644 index 00000000000..b157b5d6555 --- /dev/null +++ b/java/src/Ice/TwowayCallbackArg1UE.java @@ -0,0 +1,20 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackArg1UE<T> extends TwowayCallbackArg1<T> +{ + /** + * Called when the invocation raises an user exception. + * + * @param ex The user exception raised by the operation. + **/ + void exception(Ice.UserException ex); +}; diff --git a/java/src/Ice/TwowayCallbackBool.java b/java/src/Ice/TwowayCallbackBool.java new file mode 100644 index 00000000000..0c737e027a3 --- /dev/null +++ b/java/src/Ice/TwowayCallbackBool.java @@ -0,0 +1,20 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackBool extends TwowayCallback +{ + /** + * Called when the invocation response is received. + * + * @param arg The operation return value. + **/ + void response(boolean arg); +}; diff --git a/java/src/Ice/TwowayCallbackBoolUE.java b/java/src/Ice/TwowayCallbackBoolUE.java new file mode 100644 index 00000000000..f94fdc42190 --- /dev/null +++ b/java/src/Ice/TwowayCallbackBoolUE.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackBoolUE extends TwowayCallbackBool +{ + void exception(Ice.UserException ex); +}; diff --git a/java/src/Ice/TwowayCallbackByte.java b/java/src/Ice/TwowayCallbackByte.java new file mode 100644 index 00000000000..a08eb9bd377 --- /dev/null +++ b/java/src/Ice/TwowayCallbackByte.java @@ -0,0 +1,20 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackByte extends TwowayCallback +{ + /** + * Called when the invocation response is received. + * + * @param arg The operation return value. + **/ + void response(byte arg); +}; diff --git a/java/src/Ice/TwowayCallbackByteUE.java b/java/src/Ice/TwowayCallbackByteUE.java new file mode 100644 index 00000000000..7154f9e2a62 --- /dev/null +++ b/java/src/Ice/TwowayCallbackByteUE.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackByteUE extends TwowayCallbackByte +{ + void exception(Ice.UserException ex); +}; diff --git a/java/src/Ice/TwowayCallbackDouble.java b/java/src/Ice/TwowayCallbackDouble.java new file mode 100644 index 00000000000..852d4c0a969 --- /dev/null +++ b/java/src/Ice/TwowayCallbackDouble.java @@ -0,0 +1,20 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackDouble extends TwowayCallback +{ + /** + * Called when the invocation response is received. + * + * @param arg The operation return value. + **/ + void response(double arg); +}; diff --git a/java/src/Ice/TwowayCallbackDoubleUE.java b/java/src/Ice/TwowayCallbackDoubleUE.java new file mode 100644 index 00000000000..295ee63d16d --- /dev/null +++ b/java/src/Ice/TwowayCallbackDoubleUE.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackDoubleUE extends TwowayCallbackDouble +{ + void exception(Ice.UserException ex); +}; diff --git a/java/src/Ice/TwowayCallbackFloat.java b/java/src/Ice/TwowayCallbackFloat.java new file mode 100644 index 00000000000..effe49dff51 --- /dev/null +++ b/java/src/Ice/TwowayCallbackFloat.java @@ -0,0 +1,20 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackFloat extends TwowayCallback +{ + /** + * Called when the invocation response is received. + * + * @param arg The operation return value. + **/ + void response(float arg); +}; diff --git a/java/src/Ice/TwowayCallbackFloatUE.java b/java/src/Ice/TwowayCallbackFloatUE.java new file mode 100644 index 00000000000..4a2018c842b --- /dev/null +++ b/java/src/Ice/TwowayCallbackFloatUE.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackFloatUE extends TwowayCallbackFloat +{ + void exception(Ice.UserException ex); +}; diff --git a/java/src/Ice/TwowayCallbackInt.java b/java/src/Ice/TwowayCallbackInt.java new file mode 100644 index 00000000000..cd15516426a --- /dev/null +++ b/java/src/Ice/TwowayCallbackInt.java @@ -0,0 +1,20 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackInt extends TwowayCallback +{ + /** + * Called when the invocation response is received. + * + * @param arg The operation return value. + **/ + void response(int arg); +}; diff --git a/java/src/Ice/TwowayCallbackIntUE.java b/java/src/Ice/TwowayCallbackIntUE.java new file mode 100644 index 00000000000..a70ebcaef02 --- /dev/null +++ b/java/src/Ice/TwowayCallbackIntUE.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackIntUE extends TwowayCallbackInt +{ + void exception(Ice.UserException ex); +}; diff --git a/java/src/Ice/TwowayCallbackLong.java b/java/src/Ice/TwowayCallbackLong.java new file mode 100644 index 00000000000..3a6106613cd --- /dev/null +++ b/java/src/Ice/TwowayCallbackLong.java @@ -0,0 +1,20 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackLong extends TwowayCallback +{ + /** + * Called when the invocation response is received. + * + * @param arg The operation return value. + **/ + void response(long arg); +}; diff --git a/java/src/Ice/TwowayCallbackLongUE.java b/java/src/Ice/TwowayCallbackLongUE.java new file mode 100644 index 00000000000..f238fb49bce --- /dev/null +++ b/java/src/Ice/TwowayCallbackLongUE.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackLongUE extends TwowayCallbackLong +{ + void exception(Ice.UserException ex); +}; diff --git a/java/src/Ice/TwowayCallbackShort.java b/java/src/Ice/TwowayCallbackShort.java new file mode 100644 index 00000000000..7fd705ff950 --- /dev/null +++ b/java/src/Ice/TwowayCallbackShort.java @@ -0,0 +1,20 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackShort extends TwowayCallback +{ + /** + * Called when the invocation response is received. + * + * @param arg The operation return value. + **/ + void response(short arg); +}; diff --git a/java/src/Ice/TwowayCallbackShortUE.java b/java/src/Ice/TwowayCallbackShortUE.java new file mode 100644 index 00000000000..ffff7e63ce7 --- /dev/null +++ b/java/src/Ice/TwowayCallbackShortUE.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackShortUE extends TwowayCallbackShort +{ + void exception(Ice.UserException ex); +}; diff --git a/java/src/Ice/TwowayCallbackUE.java b/java/src/Ice/TwowayCallbackUE.java new file mode 100644 index 00000000000..ce72cb79e64 --- /dev/null +++ b/java/src/Ice/TwowayCallbackUE.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackUE extends TwowayCallback +{ + public void exception(UserException __ex); +} diff --git a/java/src/Ice/TwowayCallbackVoidUE.java b/java/src/Ice/TwowayCallbackVoidUE.java new file mode 100644 index 00000000000..32ee25a9d86 --- /dev/null +++ b/java/src/Ice/TwowayCallbackVoidUE.java @@ -0,0 +1,25 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +public interface TwowayCallbackVoidUE extends TwowayCallback +{ + /** + * Called when the invocation response is received. + **/ + void response(); + + /** + * Called when the invocation raises an user exception. + * + * @param ex The user exception raised by the operation. + **/ + void exception(Ice.UserException ex); +}; diff --git a/java/src/Ice/_Callback_Object_ice_invoke.java b/java/src/Ice/_Callback_Object_ice_invoke.java new file mode 100644 index 00000000000..4efabd91943 --- /dev/null +++ b/java/src/Ice/_Callback_Object_ice_invoke.java @@ -0,0 +1,28 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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; + +/** + * Callback object for {@link ObjectPrx#.begin_ice_invoke}. + **/ +public interface _Callback_Object_ice_invoke extends Ice.TwowayCallback +{ + /** + * The Ice run time calls <code>response</code> when an asynchronous operation invocation + * completes successfully or raises a user exception. + * + * @param __ret Indicates the result of the invocation. If <code>true</code>, the operation + * completed succesfully; if <code>false</code>, the operation raised a user exception. + * @param outParams Contains the encoded out-parameters of the operation (if any) if <code>ok</code> + * is <code>true</code>; otherwise, if <code>ok</code> is <code>false</code>, contains the + * encoded user exception raised by the operation. + **/ + public void response(boolean ret, byte[] outParams); +} diff --git a/java/src/IceInternal/CallbackBase.java b/java/src/IceInternal/CallbackBase.java index 772eb7c37ce..23f3fc395f6 100644 --- a/java/src/IceInternal/CallbackBase.java +++ b/java/src/IceInternal/CallbackBase.java @@ -13,4 +13,12 @@ public abstract class CallbackBase { public abstract void __completed(Ice.AsyncResult r); public abstract void __sent(Ice.AsyncResult r); + + public static void check(boolean cb) + { + if(!cb) + { + throw new IllegalArgumentException("callback cannot be null"); + } + } } diff --git a/java/src/IceInternal/Functional_BoolCallback.java b/java/src/IceInternal/Functional_BoolCallback.java new file mode 100644 index 00000000000..10ebefcce3e --- /dev/null +++ b/java/src/IceInternal/Functional_BoolCallback.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public interface Functional_BoolCallback +{ + void apply(boolean arg); +} diff --git a/java/src/IceInternal/Functional_ByteCallback.java b/java/src/IceInternal/Functional_ByteCallback.java new file mode 100644 index 00000000000..fbfe4f88eb1 --- /dev/null +++ b/java/src/IceInternal/Functional_ByteCallback.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public interface Functional_ByteCallback +{ + void apply(byte arg); +} diff --git a/java/src/IceInternal/Functional_CallbackBase.java b/java/src/IceInternal/Functional_CallbackBase.java new file mode 100644 index 00000000000..e66a5938bb0 --- /dev/null +++ b/java/src/IceInternal/Functional_CallbackBase.java @@ -0,0 +1,42 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_CallbackBase extends IceInternal.CallbackBase +{ + public Functional_CallbackBase(boolean responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + CallbackBase.check(responseCb || localExceptionCb != null); + __localExceptionCb = localExceptionCb; + __sentCb = sentCb; + } + + protected Functional_CallbackBase(Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + __localExceptionCb = localExceptionCb; + __sentCb = sentCb; + } + + public final void __sent(Ice.AsyncResult __result) + { + if(__sentCb != null) + { + __sentCb.apply(__result.sentSynchronously()); + } + } + + public abstract void __completed(Ice.AsyncResult __result); + + protected final Functional_GenericCallback1<Ice.LocalException> __localExceptionCb; + protected final Functional_BoolCallback __sentCb; +} diff --git a/java/src/IceInternal/Functional_DoubleCallback.java b/java/src/IceInternal/Functional_DoubleCallback.java new file mode 100644 index 00000000000..bcbebef9085 --- /dev/null +++ b/java/src/IceInternal/Functional_DoubleCallback.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public interface Functional_DoubleCallback +{ + void apply(double arg); +} diff --git a/java/src/IceInternal/Functional_FloatCallback.java b/java/src/IceInternal/Functional_FloatCallback.java new file mode 100644 index 00000000000..45b75fb7110 --- /dev/null +++ b/java/src/IceInternal/Functional_FloatCallback.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public interface Functional_FloatCallback +{ + void apply(float arg); +} diff --git a/java/src/IceInternal/Functional_GenericCallback1.java b/java/src/IceInternal/Functional_GenericCallback1.java new file mode 100644 index 00000000000..5ffb9f3a305 --- /dev/null +++ b/java/src/IceInternal/Functional_GenericCallback1.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public interface Functional_GenericCallback1<T> +{ + void apply(T arg); +} diff --git a/java/src/IceInternal/Functional_IntCallback.java b/java/src/IceInternal/Functional_IntCallback.java new file mode 100644 index 00000000000..ebd5c6615da --- /dev/null +++ b/java/src/IceInternal/Functional_IntCallback.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public interface Functional_IntCallback +{ + void apply(int arg); +} diff --git a/java/src/IceInternal/Functional_LongCallback.java b/java/src/IceInternal/Functional_LongCallback.java new file mode 100644 index 00000000000..44087884215 --- /dev/null +++ b/java/src/IceInternal/Functional_LongCallback.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public interface Functional_LongCallback +{ + void apply(long arg); +} diff --git a/java/src/IceInternal/Functional_OnewayCallback.java b/java/src/IceInternal/Functional_OnewayCallback.java new file mode 100644 index 00000000000..a9d7aa842f7 --- /dev/null +++ b/java/src/IceInternal/Functional_OnewayCallback.java @@ -0,0 +1,43 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public class Functional_OnewayCallback extends IceInternal.Functional_CallbackBase +{ + public Functional_OnewayCallback(Functional_VoidCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(localExceptionCb, sentCb); + CallbackBase.check(responseCb != null || localExceptionCb != null); + __responseCb = responseCb; + } + + public final void __completed(Ice.AsyncResult __result) + { + try + { + ((Ice.ObjectPrxHelperBase)__result.getProxy()).__end(__result, __result.getOperation()); + if(__responseCb != null) + { + __responseCb.apply(); + } + } + catch(Ice.LocalException __ex) + { + if(__localExceptionCb != null) + { + __localExceptionCb.apply(__ex); + } + } + } + + private final Functional_VoidCallback __responseCb; +} diff --git a/java/src/IceInternal/Functional_ShortCallback.java b/java/src/IceInternal/Functional_ShortCallback.java new file mode 100644 index 00000000000..21e091dd5c4 --- /dev/null +++ b/java/src/IceInternal/Functional_ShortCallback.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public interface Functional_ShortCallback +{ + void apply(short arg); +} diff --git a/java/src/IceInternal/Functional_TwowayCallback.java b/java/src/IceInternal/Functional_TwowayCallback.java new file mode 100644 index 00000000000..a03f73378c2 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallback.java @@ -0,0 +1,34 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallback extends IceInternal.Functional_CallbackBase implements Ice.TwowayCallback +{ + public Functional_TwowayCallback(boolean responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb, localExceptionCb, sentCb); + } + + protected Functional_TwowayCallback(Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(localExceptionCb, sentCb); + } + + public final void exception(Ice.LocalException ex) + { + if(__localExceptionCb != null) + { + __localExceptionCb.apply(ex); + } + } +} diff --git a/java/src/IceInternal/Functional_TwowayCallbackArg1.java b/java/src/IceInternal/Functional_TwowayCallbackArg1.java new file mode 100644 index 00000000000..e944e138fb2 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackArg1.java @@ -0,0 +1,42 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackArg1<T> extends Functional_TwowayCallback + implements Ice.TwowayCallbackArg1<T> +{ + public Functional_TwowayCallbackArg1(Functional_GenericCallback1<T> responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb != null, localExceptionCb, sentCb); + __responseCb = responseCb; + } + + protected Functional_TwowayCallbackArg1(boolean userExceptionCb, + Functional_GenericCallback1<T> responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(localExceptionCb, sentCb); + CallbackBase.check(responseCb != null || (userExceptionCb && localExceptionCb != null)); + __responseCb = responseCb; + } + + public void response(T arg) + { + if(__responseCb != null) + { + __responseCb.apply(arg); + } + } + + final private Functional_GenericCallback1<T> __responseCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackArg1UE.java b/java/src/IceInternal/Functional_TwowayCallbackArg1UE.java new file mode 100644 index 00000000000..f217661ee58 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackArg1UE.java @@ -0,0 +1,34 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackArg1UE<T> + extends Functional_TwowayCallbackArg1<T> implements Ice.TwowayCallbackArg1UE<T> +{ + public Functional_TwowayCallbackArg1UE( + Functional_GenericCallback1<T> responseCb, + Functional_GenericCallback1<Ice.UserException> userExceptionCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(userExceptionCb != null, responseCb, localExceptionCb, sentCb); + __userExceptionCb = userExceptionCb; + } + + public void exception(Ice.UserException ex) + { + if(__userExceptionCb != null) + { + __userExceptionCb.apply(ex); + } + } + + private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackBool.java b/java/src/IceInternal/Functional_TwowayCallbackBool.java new file mode 100644 index 00000000000..6014deb7132 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackBool.java @@ -0,0 +1,41 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackBool extends Functional_TwowayCallback implements Ice.TwowayCallbackBool +{ + public Functional_TwowayCallbackBool(Functional_BoolCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb != null, localExceptionCb, sentCb); + this.__responseCb = responseCb; + } + + protected Functional_TwowayCallbackBool(boolean userExceptionCb, + Functional_BoolCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(localExceptionCb, sentCb); + CallbackBase.check(responseCb != null || (userExceptionCb && localExceptionCb != null)); + this.__responseCb = responseCb; + } + + public void response(boolean arg) + { + if(__responseCb != null) + { + __responseCb.apply(arg); + } + } + + final private Functional_BoolCallback __responseCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackBoolUE.java b/java/src/IceInternal/Functional_TwowayCallbackBoolUE.java new file mode 100644 index 00000000000..7644dceb259 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackBoolUE.java @@ -0,0 +1,34 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackBoolUE + extends Functional_TwowayCallbackBool implements Ice.TwowayCallbackBoolUE +{ + public Functional_TwowayCallbackBoolUE( + Functional_BoolCallback responseCb, + Functional_GenericCallback1<Ice.UserException> userExceptionCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(userExceptionCb != null, responseCb, localExceptionCb, sentCb); + __userExceptionCb = userExceptionCb; + } + + public void exception(Ice.UserException ex) + { + if(__userExceptionCb != null) + { + __userExceptionCb.apply(ex); + } + } + + private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackByte.java b/java/src/IceInternal/Functional_TwowayCallbackByte.java new file mode 100644 index 00000000000..bbbda5685bd --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackByte.java @@ -0,0 +1,41 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackByte extends Functional_TwowayCallback implements Ice.TwowayCallbackByte +{ + public Functional_TwowayCallbackByte(Functional_ByteCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb != null, localExceptionCb, sentCb); + __responseCb = responseCb; + } + + protected Functional_TwowayCallbackByte(boolean userExceptionCb, + Functional_ByteCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(localExceptionCb, sentCb); + CallbackBase.check(responseCb != null || (userExceptionCb && localExceptionCb != null)); + __responseCb = responseCb; + } + + public void response(byte arg) + { + if(__responseCb != null) + { + __responseCb.apply(arg); + } + } + + final private Functional_ByteCallback __responseCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackByteUE.java b/java/src/IceInternal/Functional_TwowayCallbackByteUE.java new file mode 100644 index 00000000000..7f91af08792 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackByteUE.java @@ -0,0 +1,34 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackByteUE + extends Functional_TwowayCallbackByte implements Ice.TwowayCallbackByteUE +{ + public Functional_TwowayCallbackByteUE( + Functional_ByteCallback responseCb, + Functional_GenericCallback1<Ice.UserException> userExceptionCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(userExceptionCb != null, responseCb, localExceptionCb, sentCb); + __userExceptionCb = userExceptionCb; + } + + public void exception(Ice.UserException ex) + { + if(__userExceptionCb != null) + { + __userExceptionCb.apply(ex); + } + } + + private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackDouble.java b/java/src/IceInternal/Functional_TwowayCallbackDouble.java new file mode 100644 index 00000000000..3e48dd6c9f3 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackDouble.java @@ -0,0 +1,42 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackDouble + extends Functional_TwowayCallback implements Ice.TwowayCallbackDouble +{ + public Functional_TwowayCallbackDouble(Functional_DoubleCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb != null, localExceptionCb, sentCb); + __responseCb = responseCb; + } + + protected Functional_TwowayCallbackDouble(boolean userExceptionCb, + Functional_DoubleCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(localExceptionCb, sentCb); + CallbackBase.check(responseCb != null || (userExceptionCb && localExceptionCb != null)); + __responseCb = responseCb; + } + + public void response(byte arg) + { + if(__responseCb != null) + { + __responseCb.apply(arg); + } + } + + final private Functional_DoubleCallback __responseCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackDoubleUE.java b/java/src/IceInternal/Functional_TwowayCallbackDoubleUE.java new file mode 100644 index 00000000000..0a7b4959d29 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackDoubleUE.java @@ -0,0 +1,34 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackDoubleUE + extends Functional_TwowayCallbackDouble implements Ice.TwowayCallbackDoubleUE +{ + public Functional_TwowayCallbackDoubleUE( + Functional_DoubleCallback responseCb, + Functional_GenericCallback1<Ice.UserException> userExceptionCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(userExceptionCb != null, responseCb, localExceptionCb, sentCb); + __userExceptionCb = userExceptionCb; + } + + public void exception(Ice.UserException ex) + { + if(__userExceptionCb != null) + { + __userExceptionCb.apply(ex); + } + } + + private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackFloat.java b/java/src/IceInternal/Functional_TwowayCallbackFloat.java new file mode 100644 index 00000000000..cd9ba700acb --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackFloat.java @@ -0,0 +1,42 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackFloat + extends Functional_TwowayCallback implements Ice.TwowayCallbackFloat +{ + public Functional_TwowayCallbackFloat(Functional_FloatCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb != null, localExceptionCb, sentCb); + __responseCb = responseCb; + } + + protected Functional_TwowayCallbackFloat(boolean userExceptionCb, + Functional_FloatCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(localExceptionCb, sentCb); + CallbackBase.check(responseCb != null || (userExceptionCb && localExceptionCb != null)); + __responseCb = responseCb; + } + + public void response(float arg) + { + if(__responseCb != null) + { + __responseCb.apply(arg); + } + } + + final private Functional_FloatCallback __responseCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackFloatUE.java b/java/src/IceInternal/Functional_TwowayCallbackFloatUE.java new file mode 100644 index 00000000000..1bc9213a1e0 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackFloatUE.java @@ -0,0 +1,33 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackFloatUE + extends Functional_TwowayCallbackFloat implements Ice.TwowayCallbackFloatUE +{ + public Functional_TwowayCallbackFloatUE(Functional_FloatCallback responseCb, + Functional_GenericCallback1<Ice.UserException> userExceptionCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(userExceptionCb != null, responseCb, localExceptionCb, sentCb); + __userExceptionCb = userExceptionCb; + } + + public void exception(Ice.UserException ex) + { + if(__userExceptionCb != null) + { + __userExceptionCb.apply(ex); + } + } + + private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackInt.java b/java/src/IceInternal/Functional_TwowayCallbackInt.java new file mode 100644 index 00000000000..a37c4b0d167 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackInt.java @@ -0,0 +1,42 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackInt + extends Functional_TwowayCallback implements Ice.TwowayCallbackInt +{ + public Functional_TwowayCallbackInt(Functional_IntCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb != null, localExceptionCb, sentCb); + __responseCb = responseCb; + } + + protected Functional_TwowayCallbackInt(boolean userExceptionCb, + Functional_IntCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(localExceptionCb, sentCb); + CallbackBase.check(responseCb != null || (userExceptionCb && localExceptionCb != null)); + __responseCb = responseCb; + } + + public void response(int arg) + { + if(__responseCb != null) + { + __responseCb.apply(arg); + } + } + + final private Functional_IntCallback __responseCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackIntUE.java b/java/src/IceInternal/Functional_TwowayCallbackIntUE.java new file mode 100644 index 00000000000..65f111e49bd --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackIntUE.java @@ -0,0 +1,34 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackIntUE + extends Functional_TwowayCallbackInt implements Ice.TwowayCallbackIntUE +{ + public Functional_TwowayCallbackIntUE( + Functional_IntCallback responseCb, + Functional_GenericCallback1<Ice.UserException> userExceptionCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(userExceptionCb != null, responseCb, localExceptionCb, sentCb); + __userExceptionCb = userExceptionCb; + } + + public void exception(Ice.UserException ex) + { + if(__userExceptionCb != null) + { + __userExceptionCb.apply(ex); + } + } + + private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackLong.java b/java/src/IceInternal/Functional_TwowayCallbackLong.java new file mode 100644 index 00000000000..2a0233ed32d --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackLong.java @@ -0,0 +1,42 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackLong + extends Functional_TwowayCallback implements Ice.TwowayCallbackLong +{ + public Functional_TwowayCallbackLong(Functional_LongCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb != null, localExceptionCb, sentCb); + __responseCb = responseCb; + } + + protected Functional_TwowayCallbackLong(boolean userExceptionCb, + Functional_LongCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(localExceptionCb, sentCb); + CallbackBase.check(responseCb != null || (userExceptionCb && localExceptionCb != null)); + __responseCb = responseCb; + } + + public void response(long arg) + { + if(__responseCb != null) + { + __responseCb.apply(arg); + } + } + + final private Functional_LongCallback __responseCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackLongUE.java b/java/src/IceInternal/Functional_TwowayCallbackLongUE.java new file mode 100644 index 00000000000..63417055f41 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackLongUE.java @@ -0,0 +1,34 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackLongUE + extends Functional_TwowayCallbackLong implements Ice.TwowayCallbackLongUE +{ + public Functional_TwowayCallbackLongUE( + Functional_LongCallback responseCb, + Functional_GenericCallback1<Ice.UserException> userExceptionCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb, localExceptionCb, sentCb); + __userExceptionCb = userExceptionCb; + } + + public void exception(Ice.UserException ex) + { + if(__userExceptionCb != null) + { + __userExceptionCb.apply(ex); + } + } + + private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackShort.java b/java/src/IceInternal/Functional_TwowayCallbackShort.java new file mode 100644 index 00000000000..c73f4c78593 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackShort.java @@ -0,0 +1,42 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackShort + extends Functional_TwowayCallback implements Ice.TwowayCallbackShort +{ + public Functional_TwowayCallbackShort(Functional_ShortCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb != null, localExceptionCb, sentCb); + __responseCb = responseCb; + } + + protected Functional_TwowayCallbackShort(boolean userExceptionCb, + Functional_ShortCallback responseCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(localExceptionCb, sentCb); + CallbackBase.check(responseCb != null || (userExceptionCb && localExceptionCb != null)); + __responseCb = responseCb; + } + + public void response(short arg) + { + if(__responseCb != null) + { + __responseCb.apply(arg); + } + } + + final private Functional_ShortCallback __responseCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackShortUE.java b/java/src/IceInternal/Functional_TwowayCallbackShortUE.java new file mode 100644 index 00000000000..8943a0a5803 --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackShortUE.java @@ -0,0 +1,34 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackShortUE + extends Functional_TwowayCallbackShort implements Ice.TwowayCallbackShortUE +{ + public Functional_TwowayCallbackShortUE( + Functional_ShortCallback responseCb, + Functional_GenericCallback1<Ice.UserException> userExceptionCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb, localExceptionCb, sentCb); + __userExceptionCb = userExceptionCb; + } + + public void exception(Ice.UserException ex) + { + if(__userExceptionCb != null) + { + __userExceptionCb.apply(ex); + } + } + + private final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; +}; diff --git a/java/src/IceInternal/Functional_TwowayCallbackUE.java b/java/src/IceInternal/Functional_TwowayCallbackUE.java new file mode 100644 index 00000000000..e3271ed8f2c --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackUE.java @@ -0,0 +1,33 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackUE extends Functional_TwowayCallback implements Ice.TwowayCallbackUE +{ + public Functional_TwowayCallbackUE(boolean responseCb, + Functional_GenericCallback1<Ice.UserException> userExceptionCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(localExceptionCb, sentCb); + CallbackBase.check(responseCb || (userExceptionCb != null && localExceptionCb != null)); + __userExceptionCb = userExceptionCb; + } + + public final void exception(Ice.UserException ex) + { + if(__userExceptionCb != null) + { + __userExceptionCb.apply(ex); + } + } + + protected final Functional_GenericCallback1<Ice.UserException> __userExceptionCb; +} diff --git a/java/src/IceInternal/Functional_TwowayCallbackVoidUE.java b/java/src/IceInternal/Functional_TwowayCallbackVoidUE.java new file mode 100644 index 00000000000..3591d694ccd --- /dev/null +++ b/java/src/IceInternal/Functional_TwowayCallbackVoidUE.java @@ -0,0 +1,34 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class Functional_TwowayCallbackVoidUE + extends Functional_TwowayCallbackUE implements Ice.TwowayCallbackVoidUE +{ + public Functional_TwowayCallbackVoidUE( + Functional_VoidCallback responseCb, + Functional_GenericCallback1<Ice.UserException> userExceptionCb, + Functional_GenericCallback1<Ice.LocalException> localExceptionCb, + Functional_BoolCallback sentCb) + { + super(responseCb != null, userExceptionCb, localExceptionCb, sentCb); + __responseCb = responseCb; + } + + public void response() + { + if(__responseCb != null) + { + __responseCb.apply(); + } + } + + private final Functional_VoidCallback __responseCb; +}; diff --git a/java/src/IceInternal/Functional_VoidCallback.java b/java/src/IceInternal/Functional_VoidCallback.java new file mode 100644 index 00000000000..96fdcabfd2e --- /dev/null +++ b/java/src/IceInternal/Functional_VoidCallback.java @@ -0,0 +1,15 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public interface Functional_VoidCallback +{ + void apply(); +} diff --git a/java/src/IceInternal/TwowayCallback.java b/java/src/IceInternal/TwowayCallback.java new file mode 100644 index 00000000000..1a6e9b7480a --- /dev/null +++ b/java/src/IceInternal/TwowayCallback.java @@ -0,0 +1,22 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2014 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 IceInternal; + +public abstract class TwowayCallback extends CallbackBase implements Ice.TwowayCallback +{ + public void sent(boolean sentSynchronously) + { + } + + public final void __sent(Ice.AsyncResult __result) + { + sent(__result.sentSynchronously()); + } +};
\ No newline at end of file |