[LON-CAPA-cvs] cvs: loncom / LondTransaction.pm

foxr lon-capa-cvs@mail.lon-capa.org
Mon, 05 May 2003 23:58:05 -0000


foxr		Mon May  5 19:58:05 2003 EDT

  Modified files:              
    /loncom	LondTransaction.pm 
  Log:
  Planned functionality.
  
  
  
Index: loncom/LondTransaction.pm
diff -u loncom/LondTransaction.pm:1.1 loncom/LondTransaction.pm:1.2
--- loncom/LondTransaction.pm:1.1	Mon May  5 19:44:31 2003
+++ loncom/LondTransaction.pm	Mon May  5 19:58:05 2003
@@ -1,7 +1,7 @@
 #   This module defines and implements a class that represents
 #   a connection to a lond daemon.
 #
-# $Id: LondTransaction.pm,v 1.1 2003/05/05 23:44:31 foxr Exp $
+# $Id: LondTransaction.pm,v 1.2 2003/05/05 23:58:05 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -28,8 +28,96 @@
 
 =pod
 =HEAD1 Synopsis
-  LondTranaction objectifies the state of a transaction between lonc and
+  LondTransaction objectifies the state of a transaction between lonc and
   lond (loncnew really).  
 
 =cut
 
+
+=pod
+=head1 Description
+
+LondTransaction objects hold the state required to manage a 
+transaction between lonc and lond, from the loncnew point of view.
+The state consists of the following member data:
+
+=item request
+
+The text of the request to send to lond.
+
+=item active
+
+If zero, the request is not active and the londSocket item is not
+defined.
+
+=item londSocket
+
+If the request is not a deferred one (deferred = false),
+this member contains the LondConnection object reference that
+this request is being processed on.
+
+=item deferred
+
+True if the request is a deferred (delayed) request.
+The member data below are either present or not depending on 
+whether or not deferred is true.
+
+=item clientSocket
+   
+If deferred is false, this member data is defined and is the 
+handle to the socket that is connected to the apache child that
+has requested this transaction.
+
+=item DeferredFile
+
+If deferred is false, this member data is defined and is the name
+of the file that contains the deferred request.  When the transaction
+is retired, this file will be deleted.
+
+=head1 Member Functions
+
+=head2  Operational functions
+
+=item new
+
+Creates a new transaction object.
+
+=item Activate
+
+Activates the transaction by assigning it to a LondConnection object
+
+=item Retire
+
+Retires a transaction after successful completion.
+
+=item SetDeferred
+
+Sets the state of a transaction to deferred, the deferred member
+is set true, clientSocket is undefined, and DeferredFile is set.
+
+=item SetClient
+
+Sets the state of a transaction to not deferred.  The deferred member
+is set false, clientSocket is set and DeferredFile is undefined.
+
+=head2  Selectors
+
+
+=item isDeferred
+
+Returns the state of the deferred member.
+
+=item isActive
+
+Returns the staate of the active member.
+
+=item getClient
+
+if not deferred returns the client socket, else returns undef.
+
+=item getFile
+
+If deferred, returns the name of the deferred queue file else
+returns undef.
+
+=cut