net.ponder2
Class FactoryObject

java.lang.Object
  extended by net.ponder2.FactoryObject
All Implemented Interfaces:
ManagedObject

public class FactoryObject
extends java.lang.Object
implements ManagedObject

This managed object class is used to hold the factory classes for other managed objects and to instantiate new managed objects. This is the only way managed object types get into the system and the only way instances of those types are created (unless they are being restored).

Version:
$Id:$
Author:
Kevin Twidle

Constructor Summary
FactoryObject(java.lang.Class<?> adaptorClass)
          creates a managed object that acts as a factory for creating instances of the underlying managed object
 
Method Summary
protected  P2Object operation_create(P2Object source, java.lang.String op, P2Object... args)
          all messages are sent to the Managed Object being created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactoryObject

public FactoryObject(java.lang.Class<?> adaptorClass)
creates a managed object that acts as a factory for creating instances of the underlying managed object

Parameters:
adaptorClass - the P2Adaptor class that will be creating the correct object type later
Method Detail

operation_create

protected P2Object operation_create(P2Object source,
                                    java.lang.String op,
                                    P2Object... args)
                             throws Ponder2Exception
all messages are sent to the Managed Object being created. See the object's factory documentation for commands accepted.

Parameters:
op - the operation to be performed
args - an array of arguments for the operation
Returns:
the result of the operation
Throws:
Ponder2Exception


Copyright © 2008 Imperial College. All Rights Reserved.