commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r5044 - trunk/gnue-appserver/src/language


From: johannes
Subject: r5044 - trunk/gnue-appserver/src/language
Date: Tue, 27 Jan 2004 09:10:38 -0600 (CST)

Author: johannes
Date: 2004-01-27 09:10:37 -0600 (Tue, 27 Jan 2004)
New Revision: 5044

Added:
   trunk/gnue-appserver/src/language/Procedure.py
Log:
Implement a callable environment for the language interface.


Added: trunk/gnue-appserver/src/language/Procedure.py
===================================================================
--- trunk/gnue-appserver/src/language/Procedure.py      2004-01-27 15:05:42 UTC 
(rev 5043)
+++ trunk/gnue-appserver/src/language/Procedure.py      2004-01-27 15:10:37 UTC 
(rev 5044)
@@ -0,0 +1,45 @@
+# GNU Enterprise Application Server - Language interface: Object
+#
+# Copyright 2003-2004 Free Software Foundation
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it 
+# and/or modify it under the terms of the GNU General Public 
+# License as published by the Free Software Foundation; either 
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be 
+# useful, but WITHOUT ANY WARRANTY; without even the implied 
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public 
+# License along with program; see the file COPYING. If not, 
+# write to the Free Software Foundation, Inc., 59 Temple Place 
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# $Id: $
+
+# =============================================================================
+# Implement a callable environment for the language interface 
+# =============================================================================
+class Procedure:
+
+  # ---------------------------------------------------------------------------
+  # Constructor
+  # ---------------------------------------------------------------------------
+  def __init__ (self, sessionManager, sessionId, objectId, className, 
+        procedureName):
+    self._sm         = sessionManager
+    self._session_id = sessionId
+    self._object_id  = objectId
+    self._class      = className
+    self.method      = procedureName
+
+  # ---------------------------------------------------------------------------
+  # Delegate calls of this object to the session manager
+  # ---------------------------------------------------------------------------
+  def __call__ (self, *args, **kwargs):
+    self._sm.call (self._session_id, self._class, [self._object_id],
+        self.method, args)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]