[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7977 - trunk/gnue-common/src/rpc/drivers/pyro
From: |
johannes |
Subject: |
[gnue] r7977 - trunk/gnue-common/src/rpc/drivers/pyro |
Date: |
Wed, 28 Sep 2005 12:35:37 -0500 (CDT) |
Author: johannes
Date: 2005-09-23 01:02:31 -0500 (Fri, 23 Sep 2005)
New Revision: 7977
Modified:
trunk/gnue-common/src/rpc/drivers/pyro/ClientAdapter.py
Log:
Added a _destroy () method to the ServerProxy class
Modified: trunk/gnue-common/src/rpc/drivers/pyro/ClientAdapter.py
===================================================================
--- trunk/gnue-common/src/rpc/drivers/pyro/ClientAdapter.py 2005-09-23
04:01:29 UTC (rev 7976)
+++ trunk/gnue-common/src/rpc/drivers/pyro/ClientAdapter.py 2005-09-23
06:02:31 UTC (rev 7977)
@@ -39,7 +39,41 @@
"pyro from http://pyro.sf.net")
+
# =============================================================================
+# Proxy class from server objects
+# =============================================================================
+
+class ServerProxy (Base.ServerProxy):
+ """
+ A proxy class for Pyro RPC service objects. This class is needed to supply a
+ '_destroy' method to the proxy object.
+ """
+
+ # ---------------------------------------------------------------------------
+ # Constructor
+ # ---------------------------------------------------------------------------
+
+ def __init__ (self, adapter, delegate):
+
+ Base.ServerProxy.__init__ (self, adapter)
+ self.__delegate = delegate
+
+
+ # ---------------------------------------------------------------------------
+ # Attribute access
+ # ---------------------------------------------------------------------------
+
+ def __getattr__ (self, name):
+ """
+ Attribute access will be delegated to the encapsulated Pyro-Proxy object
+ """
+
+ return getattr (self.__delegate, name)
+
+
+
+# =============================================================================
# ClientAdapter
# =============================================================================
@@ -66,7 +100,7 @@
Pyro.core.initClient ()
Pyro.config.PYRO_NS_DEFAULTGROUP = self._pyroGroup
- self.__getProxyForURI = Pyro.core.getProxyForURI
+ self.__getPyroProxy = Pyro.core.getProxyForURI
# ---------------------------------------------------------------------------
@@ -80,4 +114,4 @@
@returns: Proxy object
"""
- return self.__getProxyForURI ("PYRONAME://GNUeRPCService")
+ return ServerProxy (self, self.__getPyroProxy
("PYRONAME://GNUeRPCService"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7977 - trunk/gnue-common/src/rpc/drivers/pyro,
johannes <=