summaryrefslogtreecommitdiff
path: root/TAO/tests/Smart_Proxies/Policy/README
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Smart_Proxies/Policy/README')
-rw-r--r--TAO/tests/Smart_Proxies/Policy/README87
1 files changed, 87 insertions, 0 deletions
diff --git a/TAO/tests/Smart_Proxies/Policy/README b/TAO/tests/Smart_Proxies/Policy/README
new file mode 100644
index 00000000000..f24653ec589
--- /dev/null
+++ b/TAO/tests/Smart_Proxies/Policy/README
@@ -0,0 +1,87 @@
+$Id$
+
+Smart Proxies Overview
+----------------------
+
+Smart Proxies are a TAO extension that helps applications create
+user-defined proxies that can be used to add custom client-side
+processing and security to the default stub proxy.
+
+For details on how TAO implements Smart Proxies please see:
+
+www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/Smart_Proxies.html
+
+Smart Proxy Example
+-------------------
+
+This directory contains a simple example that demostrats how the TAO
+Smart Proxy feature can be used. In this example, just a single
+method has been "smartified" to illustrate how you just implement the
+methods you wish to customize since the rest will be taken care of the
+genearated Smart Proxy base class.
+
+All you need to define in the client application is a new factory that
+will produce the kind of proxy desired by the user. This factory must
+be provided by the user and must derive from the generated
+TAO_Default_Proxy_Factory class.
+
+This test particularly is used to test out the different policies for the
+smart proxy. If the same smart proxy is needed for the interface the
+"one-shot" policy is to be used by which once a smart proxy factory is
+registered it is retained until the program terminates. This is the default
+behavior. But if a more flexible option is desired where the smart proxy
+can be different with every instance of the target object, then the
+one-shot plolicy has to be disabled by passing a 0 at creation time.
+
+For execution of the test:
+
+1) ./server -o test1.ior
+
+2) ./server -o test2.ior
+
+2) ./client
+
+The -f0 option tries out the "per-object" policy and the -f1 (default)
+tries out the "one-shot" aka "per-interface" policy.
+
+or simply use:
+
+run_test.pl
+
+Happy troubleshooting!
+
+
+===============EXPECTED OUTPUT==========================
+running Smart Proxy test consisting of the client and two servers with <one-shot> policy
+
+Smart_Test_Factory
+create_smart_proxy
+Yahoo, I am smart
+Test_i::method () invoked
+event loop finished
+create_smart_proxy
+Yahoo, I am smart
+Test_i::method () invoked
+event loop finished
+
+running Smart Proxy test consisting of the client and two servers with <one-shot> policy disabled
+
+Smart_Test_Factory
+create_smart_proxy
+Yahoo, I am smart
+Test_i::method () invoked
+event loop finished
+Test_i::method () invoked
+event loop finished
+===========================================================================================
+
+Note: Difference in output of first two cases:
+"Yahoo, I am smart" signifies that the smart proxy is being called. In the first case,
+it is seen twice demostrating that with both servers the same kind of smart proxy was
+used since the smart proxy factory was permanent in behavior or "one-shot".
+
+While in send portion of the output, the smart proxy is used only once, that is in the
+first time around and the default proxy is called upon the second time. This is because
+the smart proxy factory gets unregistered since the "one-shot" policy is disabled.
+
+For details, please see: http://www.cs.wustl.edu/~schmidt/PDF/COOTS-00.pdf