Ponder2 Class Structure
This section of the Ponder2 Wiki describes the internal core Java classes that comprise the SMC. This information is designed to be read in conjunction with the Ponder2 JavaDoc documentation and the Ponder2 Managed Object documentation.
The basic set of classes is shown in the following UML diagram
All Java managed object code files (including user code) implement the empty interface ManagedObject. This tells the compiler that it is to be a managed object. e.g. Policy and Domain do this.
All Java Managed Objects get a shadow sub-class of P2ObjectAdaptor which provides the calls into the user code. e.g. PolicyP2Adaptor is shown. It contains the PonderTalk commands that can be made to a Policy. This is generated by the compiler.
P2Object is the main API for objects in the system.
Domains now hold instances of P2ManagedObject. A P2ManagedObject is only created for a P2Object when required. That is to say, the overhead of creating the tables and OID for an object is only performed when e.g. the object is to be put into a domain. If the object is used only in variables or as arguments at the PonderTalk level then the overhead is avoided. This speeds up creation of objects.
OIDs are only used by the system when managed objects are external to the Ponder2 system. Every P2ManagedObject has an OID. OIDs refer back to the P2Managed object unless the OID is for an external object.