summaryrefslogtreecommitdiff
path: root/java/demo
diff options
context:
space:
mode:
Diffstat (limited to 'java/demo')
-rw-r--r--java/demo/Glacier2/callback/Client.java6
-rw-r--r--java/demo/Ice/hello/Client.java4
-rw-r--r--java/demo/Ice/swing/Client.java14
-rw-r--r--java/demo/IceBox/hello/Client.java3
-rw-r--r--java/demo/IceDiscovery/hello/Client.java4
5 files changed, 22 insertions, 9 deletions
diff --git a/java/demo/Glacier2/callback/Client.java b/java/demo/Glacier2/callback/Client.java
index bb6c8c92d03..07eab42ad0d 100644
--- a/java/demo/Glacier2/callback/Client.java
+++ b/java/demo/Glacier2/callback/Client.java
@@ -182,12 +182,12 @@ public class Client extends Glacier2.Application
if(override != null)
{
context.put("_ovrd", override);
- }
+ }
batchOneway.initiateCallback(onewayR, context);
}
else if(line.equals("f"))
{
- communicator().flushBatchRequests();
+ batchOneway.ice_flushBatchRequests();
}
else if(line.equals("v"))
{
@@ -221,7 +221,7 @@ public class Client extends Glacier2.Application
onewayR.ice_identity(callbackReceiverIdent));
}
- System.out.println("callback receiver identity: " +
+ System.out.println("callback receiver identity: " +
communicator().identityToString(twowayR.ice_getIdentity()));
}
else if(line.equals("s"))
diff --git a/java/demo/Ice/hello/Client.java b/java/demo/Ice/hello/Client.java
index 184e5abb2f0..5a728fc79da 100644
--- a/java/demo/Ice/hello/Client.java
+++ b/java/demo/Ice/hello/Client.java
@@ -132,7 +132,8 @@ public class Client extends Ice.Application
}
else if(line.equals("f"))
{
- communicator().flushBatchRequests();
+ batchOneway.ice_flushBatchRequests();
+ batchDatagram.ice_flushBatchRequests();
}
else if(line.equals("T"))
{
@@ -237,4 +238,3 @@ public class Client extends Ice.Application
System.exit(status);
}
}
-
diff --git a/java/demo/Ice/swing/Client.java b/java/demo/Ice/swing/Client.java
index c4530badc0a..e7bb118f04d 100644
--- a/java/demo/Ice/swing/Client.java
+++ b/java/demo/Ice/swing/Client.java
@@ -460,6 +460,13 @@ public class Client extends JFrame
prx = prx.ice_invocationTimeout(timeout);
}
_helloPrx = Demo.HelloPrxHelper.uncheckedCast(prx);
+
+ //
+ // The batch requests associated to the proxy are lost when we
+ // update the proxy.
+ //
+ _flush.setEnabled(false);
+
_status.setText("Ready");
}
@@ -583,7 +590,12 @@ public class Client extends JFrame
private void flush()
{
- _communicator.begin_flushBatchRequests(new Ice.Callback_Communicator_flushBatchRequests()
+ if(_helloPrx == null)
+ {
+ return;
+ }
+
+ _helloPrx.begin_ice_flushBatchRequests(new Ice.Callback_Object_ice_flushBatchRequests()
{
@Override
public void exception(final Ice.LocalException ex)
diff --git a/java/demo/IceBox/hello/Client.java b/java/demo/IceBox/hello/Client.java
index 7ed2542cde5..f941c513f23 100644
--- a/java/demo/IceBox/hello/Client.java
+++ b/java/demo/IceBox/hello/Client.java
@@ -110,7 +110,8 @@ public class Client extends Ice.Application
}
else if(line.equals("f"))
{
- communicator().flushBatchRequests();
+ batchOneway.ice_flushBatchRequests();
+ batchDatagram.ice_flushBatchRequests();
}
else if(line.equals("x"))
{
diff --git a/java/demo/IceDiscovery/hello/Client.java b/java/demo/IceDiscovery/hello/Client.java
index 36c7cd21702..02997b9c854 100644
--- a/java/demo/IceDiscovery/hello/Client.java
+++ b/java/demo/IceDiscovery/hello/Client.java
@@ -131,7 +131,8 @@ public class Client extends Ice.Application
}
else if(line.equals("f"))
{
- communicator().flushBatchRequests();
+ batchOneway.ice_flushBatchRequests();
+ batchDatagram.ice_flushBatchRequests();
}
else if(line.equals("T"))
{
@@ -236,4 +237,3 @@ public class Client extends Ice.Application
System.exit(status);
}
}
-