diff options
author | Matthew Newhook <matthew@zeroc.com> | 2008-03-06 14:26:07 +0800 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2008-03-06 14:26:07 +0800 |
commit | bc6cdac7eda5e31c8fab6e891a7dc2078a7d22c6 (patch) | |
tree | dc10cb41cd1280cf115c6bf5a1302481a969e15d /java/demo/Ice | |
parent | Fix to fix for 2395. Backed out Dwayne's previous change because we both work... (diff) | |
download | ice-bc6cdac7eda5e31c8fab6e891a7dc2078a7d22c6.tar.bz2 ice-bc6cdac7eda5e31c8fab6e891a7dc2078a7d22c6.tar.xz ice-bc6cdac7eda5e31c8fab6e891a7dc2078a7d22c6.zip |
Squashed commit of the following:
commit c2f83d9a3e0e1f97e76f33d7992ef8e3e2994d91
Author: Matthew Newhook <matthew@zeroc.com>
Date: Thu Mar 6 14:22:52 2008 +0800
Cleanup some IceGrid configuration files.
commit 4e33903c9ae238b9e317fc3f1f3e281c816374dd
Author: Matthew Newhook <matthew@zeroc.com>
Date: Thu Mar 6 14:17:10 2008 +0800
remove ttl setting.
commit c418b308ff7cc8e8a4296819938b88dfedc16a97
Author: Matthew Newhook <matthew@zeroc.com>
Date: Thu Mar 6 14:16:32 2008 +0800
remove useless PopulateEmptyIndices config.
commit da70d3936f921aa2c92bd2db7b1fcddb4467a9bd
Author: Matthew Newhook <matthew@zeroc.com>
Date: Thu Mar 6 13:59:51 2008 +0800
- Removed interrupt handlers for interactive C++ demos.
- Lots of cleanups to demos.
Diffstat (limited to 'java/demo/Ice')
30 files changed, 192 insertions, 97 deletions
diff --git a/java/demo/Ice/bidir/Callback.ice b/java/demo/Ice/bidir/Callback.ice index 27946b05bf5..27946b05bf5 100755..100644 --- a/java/demo/Ice/bidir/Callback.ice +++ b/java/demo/Ice/bidir/Callback.ice diff --git a/java/demo/Ice/bidir/CallbackReceiverI.java b/java/demo/Ice/bidir/CallbackReceiverI.java index aa45e98e016..aa45e98e016 100755..100644 --- a/java/demo/Ice/bidir/CallbackReceiverI.java +++ b/java/demo/Ice/bidir/CallbackReceiverI.java diff --git a/java/demo/Ice/bidir/CallbackSenderI.java b/java/demo/Ice/bidir/CallbackSenderI.java index 332c1c75614..332c1c75614 100755..100644 --- a/java/demo/Ice/bidir/CallbackSenderI.java +++ b/java/demo/Ice/bidir/CallbackSenderI.java diff --git a/java/demo/Ice/bidir/Client.java b/java/demo/Ice/bidir/Client.java index 8afbafee5bb..de4f69f6c2b 100755..100644 --- a/java/demo/Ice/bidir/Client.java +++ b/java/demo/Ice/bidir/Client.java @@ -20,8 +20,8 @@ public class Client extends Ice.Application return 1; } - CallbackSenderPrx server = - CallbackSenderPrxHelper.checkedCast(communicator().propertyToProxy("Callback.Client.CallbackServer")); + CallbackSenderPrx server = CallbackSenderPrxHelper.checkedCast( + communicator().propertyToProxy("CallbackSender.Proxy")); if(server == null) { System.err.println("invalid proxy"); diff --git a/java/demo/Ice/bidir/Server.java b/java/demo/Ice/bidir/Server.java index a07555d003a..a07555d003a 100755..100644 --- a/java/demo/Ice/bidir/Server.java +++ b/java/demo/Ice/bidir/Server.java diff --git a/java/demo/Ice/bidir/build.xml b/java/demo/Ice/bidir/build.xml index ca217abe522..ca217abe522 100755..100644 --- a/java/demo/Ice/bidir/build.xml +++ b/java/demo/Ice/bidir/build.xml diff --git a/java/demo/Ice/bidir/config.client b/java/demo/Ice/bidir/config.client index edb912f2db7..d336e250178 100755..100644 --- a/java/demo/Ice/bidir/config.client +++ b/java/demo/Ice/bidir/config.client @@ -1,28 +1,33 @@ -Callback.Client.CallbackServer=sender:tcp -p 10000
-
-# Active connection management must be disabled when using
-# bidirectional connections.
-Ice.ACM.Client=0
-
-#
-# Warn about connection exceptions
-#
-Ice.Warn.Connections=1
-
-#
-# Network Tracing
-#
-# 0 = no network tracing
-# 1 = trace connection establishment and closure
-# 2 = like 1, but more detailed
-# 3 = like 2, but also trace data transfer
-#
-#Ice.Trace.Network=1
-
-#
-# Protocol Tracing
-#
-# 0 = no protocol tracing
-# 1 = trace protocol messages
-#
-#Ice.Trace.Protocol=1
+# +# The client reads this property to create the reference to the +# "CallbackSender" object in the server. +# +CallbackSender.Proxy=sender:tcp -p 10000 + +# +# Warn about connection exceptions +# +Ice.Warn.Connections=1 + +# +# Client-side ACM must be disabled for bidirectional connections. +# +Ice.ACM.Client=0 + +# +# Network Tracing +# +# 0 = no network tracing +# 1 = trace connection establishment and closure +# 2 = like 1, but more detailed +# 3 = like 2, but also trace data transfer +# +#Ice.Trace.Network=1 + +# +# Protocol Tracing +# +# 0 = no protocol tracing +# 1 = trace protocol messages +# +#Ice.Trace.Protocol=1 diff --git a/java/demo/Ice/bidir/config.server b/java/demo/Ice/bidir/config.server index 1e6ffd5e484..d9c7154678a 100755..100644 --- a/java/demo/Ice/bidir/config.server +++ b/java/demo/Ice/bidir/config.server @@ -1,28 +1,29 @@ -Callback.Server.Endpoints=tcp -p 10000
-
-# Active connection management must be disabled when using
-# bidirectional connections.
-Ice.ACM.Client=0
-
-#
-# Warn about connection exceptions
-#
-Ice.Warn.Connections=1
-
-#
-# Network Tracing
-#
-# 0 = no network tracing
-# 1 = trace connection establishment and closure
-# 2 = like 1, but more detailed
-# 3 = like 2, but also trace data transfer
-#
-#Ice.Trace.Network=1
-
-#
-# Protocol Tracing
-#
-# 0 = no protocol tracing
-# 1 = trace protocol messages
-#
-#Ice.Trace.Protocol=1
+# +# The server creates one single object adapter with the name +# "Callback.Server". The following line sets the endpoints for this +# adapter. +# +Callback.Server.Endpoints=tcp -p 10000 + +# +# Warn about connection exceptions +# +Ice.Warn.Connections=1 + +# +# Network Tracing +# +# 0 = no network tracing +# 1 = trace connection establishment and closure +# 2 = like 1, but more detailed +# 3 = like 2, but also trace data transfer +# +#Ice.Trace.Network=1 + +# +# Protocol Tracing +# +# 0 = no protocol tracing +# 1 = trace protocol messages +# +#Ice.Trace.Protocol=1 diff --git a/java/demo/Ice/callback/Client.java b/java/demo/Ice/callback/Client.java index a2a81d4c5af..8785f1bb44c 100644 --- a/java/demo/Ice/callback/Client.java +++ b/java/demo/Ice/callback/Client.java @@ -61,7 +61,7 @@ public class Client extends Ice.Application setInterruptHook(new ShutdownHook()); CallbackSenderPrx twoway = CallbackSenderPrxHelper.checkedCast( - communicator().propertyToProxy("Callback.CallbackServer"). + communicator().propertyToProxy("CallbackSender.Proxy"). ice_twoway().ice_timeout(-1).ice_secure(false)); if(twoway == null) { diff --git a/java/demo/Ice/callback/config.client b/java/demo/Ice/callback/config.client index b53d5737c4b..242366bb84f 100644 --- a/java/demo/Ice/callback/config.client +++ b/java/demo/Ice/callback/config.client @@ -1,4 +1,14 @@ -Callback.CallbackServer=callback:tcp -p 12000:udp -p 10000:ssl -p 10001 +# +# The client reads this property to create the reference to the +# "CallbackSender" object in the server. +# +CallbackSender.Proxy=callback:tcp -p 10000:udp -p 10000:ssl -p 10001 + +# +# The client creates one single object adapter with the name +# "Callback.Client". The following line sets the endpoints for this +# adapter. +# Callback.Client.Endpoints=tcp:udp:ssl # diff --git a/java/demo/Ice/callback/config.server b/java/demo/Ice/callback/config.server index c1b58bd8e45..72ea2cf0425 100644 --- a/java/demo/Ice/callback/config.server +++ b/java/demo/Ice/callback/config.server @@ -1,4 +1,9 @@ -Callback.Server.Endpoints=tcp -p 12000:udp -p 10000:ssl -p 10001 +# +# The server creates one single object adapter with the name +# "Callback.Server". The following line sets the endpoints for this +# adapter. +# +Callback.Server.Endpoints=tcp -p 10000:udp -p 10000:ssl -p 10001 # # Warn about connection exceptions diff --git a/java/demo/Ice/hello/config.client b/java/demo/Ice/hello/config.client index cc90296023a..0848342c1e0 100644 --- a/java/demo/Ice/hello/config.client +++ b/java/demo/Ice/hello/config.client @@ -5,12 +5,15 @@ Hello.Proxy=hello:tcp -p 10000:udp -p 10000:ssl -p 10001 # -# Warn about connection exceptions +# Warn about connection exceptions. # -#Ice.Warn.Connections=1 +Ice.Warn.Connections=1 # -# We want a faster ACM for this demo. +# Client-side ACM is enabled by default, with an interval of 60 +# seconds. For this demo, we want to use a short timeout of 10 +# seconds. By enabling network tracing below, you can see ACM +# automatically close idle connections. # Ice.ACM.Client=10 diff --git a/java/demo/Ice/hello/config.server b/java/demo/Ice/hello/config.server index ff82b6b45d1..0e7b9b199fc 100644 --- a/java/demo/Ice/hello/config.server +++ b/java/demo/Ice/hello/config.server @@ -1,17 +1,20 @@ # # The server creates one single object adapter with the name -# "helloadapater". The following line sets the endpoints for this -# adapter +# "Hello". The following line sets the endpoints for this +# adapter. # Hello.Endpoints=tcp -p 10000:udp -p 10000:ssl -p 10001 # # Warn about connection exceptions # -#Ice.Warn.Connections=1 +Ice.Warn.Connections=1 # -# We want a faster ACM for this demo. +# Server-side ACM is disabled by default. For this demo, we want it +# enabled and set to a short timeout of 10 seconds. By enabling +# network tracing below, you can see ACM automatically close idle +# connections. # Ice.ACM.Server=10 diff --git a/java/demo/Ice/invoke/config.client b/java/demo/Ice/invoke/config.client index 936a2f30fcc..f7e66d46fd0 100644 --- a/java/demo/Ice/invoke/config.client +++ b/java/demo/Ice/invoke/config.client @@ -1,6 +1,6 @@ # # The client reads this property to create the reference to the -# "hello" object in the server. +# "Printer" object in the server. # Printer.Proxy=printer:default -p 10000 diff --git a/java/demo/Ice/invoke/config.server b/java/demo/Ice/invoke/config.server index 21ec8851e14..0c4b1af77b7 100644 --- a/java/demo/Ice/invoke/config.server +++ b/java/demo/Ice/invoke/config.server @@ -1,7 +1,7 @@ # # The server creates one single object adapter with the name -# "helloadapater". The following line sets the endpoints for this -# adapter +# "Printer". The following line sets the endpoints for this +# adapter. # Printer.Endpoints=default -p 10000 diff --git a/java/demo/Ice/latency/Client.java b/java/demo/Ice/latency/Client.java index a11f1804913..4f591420581 100644 --- a/java/demo/Ice/latency/Client.java +++ b/java/demo/Ice/latency/Client.java @@ -20,7 +20,7 @@ class Client extends Ice.Application return 1; } - PingPrx ping = PingPrxHelper.checkedCast(communicator().propertyToProxy("Latency.Ping")); + PingPrx ping = PingPrxHelper.checkedCast(communicator().propertyToProxy("Ping.Proxy")); if(ping == null) { System.err.println("invalid proxy"); diff --git a/java/demo/Ice/latency/config.client b/java/demo/Ice/latency/config.client index 2faeb27a191..ae1a2e4e066 100644 --- a/java/demo/Ice/latency/config.client +++ b/java/demo/Ice/latency/config.client @@ -1,3 +1,10 @@ -Latency.Ping=ping:default -p 10000 -h 127.0.0.1 +# +# The client reads this property to create the reference to the "Ping" +# object in the server. +# +Ping.Proxy=ping:default -p 10000 -h 127.0.0.1 +# +# Disable client-side ACM. +# Ice.ACM.Client=0 diff --git a/java/demo/Ice/latency/config.server b/java/demo/Ice/latency/config.server index 6d82f1a7f2e..75e3479d6fe 100644 --- a/java/demo/Ice/latency/config.server +++ b/java/demo/Ice/latency/config.server @@ -1 +1,10 @@ +# +# The server creates one single object adapter with the name +# "Latency". The following line sets the endpoints for this adapter. +# Latency.Endpoints=default -p 10000 -h 127.0.0.1 + +# +# Warn about connection exceptions +# +Ice.Warn.Connections=1 diff --git a/java/demo/Ice/multicast/Client.java b/java/demo/Ice/multicast/Client.java index 14afa06d235..a4f137a2616 100644 --- a/java/demo/Ice/multicast/Client.java +++ b/java/demo/Ice/multicast/Client.java @@ -30,7 +30,6 @@ public class Client extends Ice.Application discover.lookup(reply); Ice.ObjectPrx base = replyI.waitReply(2000); - if(base == null) { System.err.println(appName() + ": no replies"); diff --git a/java/demo/Ice/multicast/config.client b/java/demo/Ice/multicast/config.client index 1335102bf9a..b68bb269f33 100644 --- a/java/demo/Ice/multicast/config.client +++ b/java/demo/Ice/multicast/config.client @@ -1,6 +1,6 @@ # # The client reads this property to create the reference to the -# "discovery" object in the server. +# "Discover" object in the server. # Discover.Proxy=discover:udp -h 224.0.0.5 -p 10000 @@ -20,12 +20,7 @@ DiscoverReply.Endpoints=tcp # # Warn about connection exceptions # -#Ice.Warn.Connections=1 - -# -# We want a faster ACM for this demo. -# -Ice.ACM.Client=10 +Ice.Warn.Connections=1 # # Network Tracing diff --git a/java/demo/Ice/multicast/config.server b/java/demo/Ice/multicast/config.server index b92327ce946..451f9e5d5a5 100644 --- a/java/demo/Ice/multicast/config.server +++ b/java/demo/Ice/multicast/config.server @@ -19,7 +19,7 @@ Hello.Endpoints=tcp # # Warn about connection exceptions # -#Ice.Warn.Connections=1 +Ice.Warn.Connections=1 # # Network Tracing diff --git a/java/demo/Ice/nested/Client.java b/java/demo/Ice/nested/Client.java index c67036d149e..3fb455eeb5c 100644 --- a/java/demo/Ice/nested/Client.java +++ b/java/demo/Ice/nested/Client.java @@ -49,8 +49,7 @@ public class Client extends Ice.Application // setInterruptHook(new ShutdownHook()); - NestedPrx nested = NestedPrxHelper.checkedCast( - communicator().propertyToProxy("Nested.NestedServer")); + NestedPrx nested = NestedPrxHelper.checkedCast(communicator().propertyToProxy("Nested.Proxy")); if(nested == null) { System.err.println("invalid proxy"); diff --git a/java/demo/Ice/nested/config.client b/java/demo/Ice/nested/config.client index 741856b4b3b..066f1dc8fd8 100644 --- a/java/demo/Ice/nested/config.client +++ b/java/demo/Ice/nested/config.client @@ -1,6 +1,23 @@ -Nested.NestedServer=nestedServer:default -p 10000 -t 10000 +# +# The client reads this property to create the reference to the +# "Nested" object in the server. +# +Nested.Proxy=nestedServer:default -p 10000 -t 10000 + +# +# The client creates one single object adapter with the name +# "Nested.Client". The following line sets the endpoints for this +# adapter. +# Nested.Client.Endpoints=default -t 10000 +# +# The following properties configure the server thread pool. The +# thread pool initially contains 5 threads, and the Ice run time +# starts emitting warnings once 5 threads are in use. The Ice run time +# creates more threads once all 5 are in use, up to a maximum of 10 +# threads. +# Ice.ThreadPool.Server.Size=5 Ice.ThreadPool.Server.SizeWarn=5 Ice.ThreadPool.Server.SizeMax=10 @@ -8,7 +25,7 @@ Ice.ThreadPool.Server.SizeMax=10 # # Warn about connection exceptions # -#Ice.Warn.Connections=1 +Ice.Warn.Connections=1 # # Network Tracing diff --git a/java/demo/Ice/nested/config.server b/java/demo/Ice/nested/config.server index e0073284155..94d3ca82be4 100644 --- a/java/demo/Ice/nested/config.server +++ b/java/demo/Ice/nested/config.server @@ -1,5 +1,17 @@ +# +# The server creates one single object adapter with the name +# "Nested.Server". The following line sets the endpoints for this +# adapter. +# Nested.Server.Endpoints=default -p 10000 -t 10000 +# +# The following properties configure the server thread pool. The +# thread pool initially contains 5 threads, and the Ice run time +# starts emitting warnings once 5 threads are in use. The Ice run time +# creates more threads once all 5 are in use, up to a maximum of 10 +# threads. +# Ice.ThreadPool.Server.Size=5 Ice.ThreadPool.Server.SizeWarn=5 Ice.ThreadPool.Server.SizeMax=10 @@ -7,7 +19,7 @@ Ice.ThreadPool.Server.SizeMax=10 # # Warn about connection exceptions # -#Ice.Warn.Connections=1 +Ice.Warn.Connections=1 # # Network Tracing diff --git a/java/demo/Ice/throughput/Client.java b/java/demo/Ice/throughput/Client.java index 1f5dcb32018..8f6a4176705 100644 --- a/java/demo/Ice/throughput/Client.java +++ b/java/demo/Ice/throughput/Client.java @@ -67,8 +67,7 @@ public class Client extends Ice.Application // setInterruptHook(new ShutdownHook()); - Ice.ObjectPrx base = communicator().propertyToProxy("Throughput.Throughput"); - ThroughputPrx throughput = ThroughputPrxHelper.checkedCast(base); + ThroughputPrx throughput = ThroughputPrxHelper.checkedCast(communicator().propertyToProxy("Throughput.Proxy")); if(throughput == null) { System.err.println("invalid proxy"); diff --git a/java/demo/Ice/throughput/config.client b/java/demo/Ice/throughput/config.client index 137aced2558..0f763b09d20 100644 --- a/java/demo/Ice/throughput/config.client +++ b/java/demo/Ice/throughput/config.client @@ -1,4 +1,10 @@ -Throughput.Throughput=throughput:default -p 10000 -h 127.0.0.1 +# +# The client reads this property to create the reference to the +# "Throughput" object in the server. +# +Throughput.Proxy=throughput:default -p 10000 -h 127.0.0.1 +# +# Disable client-side ACM. +# Ice.ACM.Client=0 -Ice.ACM.Server=0 diff --git a/java/demo/Ice/throughput/config.server b/java/demo/Ice/throughput/config.server index ab09821b6b0..1a301bb3ed6 100644 --- a/java/demo/Ice/throughput/config.server +++ b/java/demo/Ice/throughput/config.server @@ -1,4 +1,11 @@ -Throughput.Endpoints=default -p 10000 +# +# The server creates one single object adapter with the name +# "Throughput". The following line sets the endpoints for this +# adapter. +# +Throughput.Endpoints=default -p 10000 -h 127.0.0.1 -Ice.ACM.Client=0 -Ice.ACM.Server=0 +# +# Warn about connection exceptions +# +Ice.Warn.Connections=1 diff --git a/java/demo/Ice/value/Client.java b/java/demo/Ice/value/Client.java index b1a6feaeaa4..dfd8ca53e07 100644 --- a/java/demo/Ice/value/Client.java +++ b/java/demo/Ice/value/Client.java @@ -56,8 +56,7 @@ public class Client extends Ice.Application // setInterruptHook(new ShutdownHook()); - Ice.ObjectPrx base = communicator().propertyToProxy("Value.Initial"); - InitialPrx initial = InitialPrxHelper.checkedCast(base); + InitialPrx initial = InitialPrxHelper.checkedCast(communicator().propertyToProxy("Initial.Proxy")); if(initial == null) { System.err.println("invalid object reference"); diff --git a/java/demo/Ice/value/config.client b/java/demo/Ice/value/config.client index 1ffc432a7b9..cf32f52ca5d 100644 --- a/java/demo/Ice/value/config.client +++ b/java/demo/Ice/value/config.client @@ -1,4 +1,13 @@ -Value.Initial=initial:default -p 10000 +# +# The client reads this property to create the reference to the +# "Initial" object in the server. +# +Initial.Proxy=initial:default -p 10000 + +# +# Warn about connection exceptions +# +Ice.Warn.Connections=1 # # SSL Configuration diff --git a/java/demo/Ice/value/config.server b/java/demo/Ice/value/config.server index cd32b9979cc..32fbaca603d 100644 --- a/java/demo/Ice/value/config.server +++ b/java/demo/Ice/value/config.server @@ -1,6 +1,16 @@ +# +# The server creates one single object adapter with the name +# "Value". The following line sets the endpoints for this +# adapter. +# Value.Endpoints=default -p 10000 # +# Warn about connection exceptions +# +Ice.Warn.Connections=1 + +# # SSL Configuration # Ice.Plugin.IceSSL=IceSSL.PluginFactory |