The bank fasl file defines three abstract servant classes
corresponding to the IDL interfaces
. The class
is defined to inherit from
, matching the inheritance relationship in the IDL.
Note that each class inherits from the abstract class
, allowing instances of the class to be registered with a POA.
In our implementation of the bank server, these servant classes are implemented by the subclasses
by representing a bank as a connection to a database:
(defclass bank-implementation (BankingDemo:Bank-servant)
((connection :initarg :connection)
(poa :initarg :poa)
(account-impls :initform nil)))
We have included the
slot to record the POA in which the bank servant is active, so that servants representing accounts at the bank can be registered in the same POA. A slot
corresponding to the attribute name defined in the IDL is inherited from the
, as are definitions of accessor functions for this slot.
(defclass account-implementation (BankingDemo:Account-servant)
((bank :initarg :bank)))
An instance of this class represents an account. The
slot provides a connection to the database that holds the account's record. Slots
, corresponding to attributes defined in the IDL, are inherited from
slot identifies the record in the database.
simply by inheriting from
(defclass checkingaccount-implementation (Bankingdemo:Checkingaccount-servant account-implementation)
, corresponding to the attribute limit defined in the IDL, is inherited from