|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ponder2.objects.P2Object
net.ponder2.P2ObjectAdaptor
public class P2ObjectAdaptor
An object adaptor manages the interface between the ponder2 system and the actual managed object itself
Nested Class Summary | |
---|---|
static class |
P2ObjectAdaptor.CreateOperation
Base class to map an operation with known arguments to a specific call within a managed object |
static class |
P2ObjectAdaptor.CreateOrStaticOperation
|
static class |
P2ObjectAdaptor.InstanceOperation
Base class to map an operation with known arguments to a specific call within a managed object |
static class |
P2ObjectAdaptor.StaticOperation
Base class to map an operation with known arguments to a specific call within a managed object |
Field Summary | |
---|---|
protected ManagedObject |
objImpl
The instance of the managed object to be called |
Constructor Summary | |
---|---|
P2ObjectAdaptor()
Creates an empty object adaptor. |
|
P2ObjectAdaptor(P2Object source,
java.lang.String operation,
P2Object... args)
|
Method Summary | |
---|---|
P2Object |
create(P2Object source,
java.lang.String operation,
P2Object... args)
called as a result of an operation on the factory managed object for this managed object |
static AuthorisationModule |
getAuthorisation()
Returns the authorisation module in use, if any. |
P2ObjectAdaptor.CreateOperation |
getCreateOperation(java.lang.String opName)
|
void |
getCreateOrStaticOperation(P2ObjectAdaptor.CreateOrStaticOperation opInfo)
|
P2ObjectAdaptor.InstanceOperation |
getInstanceOperation(java.lang.String opName)
|
ManagedObject |
getObj()
|
P2Object |
operation(P2Object source,
java.lang.String operation,
P2Object... args)
called as a result of an operation on the instantiated managed object |
void |
readExternal(java.io.ObjectInput in)
|
protected java.lang.Object |
readResolve()
Resolves instances being deserialised to the preexisting objects. |
P2Object |
readXml(com.twicom.qdparser.TaggedElement xml,
java.util.Map<java.lang.Integer,P2Serializable> read)
|
static void |
setAuthorisation(AuthorisationModule auth)
Turns authorisation checking on by setting the authorisation module that will be checking commands. |
void |
setObj(ManagedObject obj)
|
protected static void |
trace(java.lang.String opType,
java.lang.String className,
java.lang.String operation,
P2Object... args)
Prints a command trace line on stderr. |
void |
writeExternal(java.io.ObjectOutput out)
|
com.twicom.qdparser.TaggedElement |
writeXml(java.util.Set<P2Object> written)
|
Methods inherited from class net.ponder2.objects.P2Object |
---|
asArray, asBlock, asBoolean, asClass, asDouble, asFloat, asHash, asInteger, asLong, asNumber, asP2Array, asString, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, fromXml, getManagedObject, getOID, getSMC, operation, setSMC |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ManagedObject objImpl
Constructor Detail |
---|
public P2ObjectAdaptor()
public P2ObjectAdaptor(P2Object source, java.lang.String operation, P2Object... args) throws Ponder2Exception
Ponder2Exception
Method Detail |
---|
public void setObj(ManagedObject obj)
public ManagedObject getObj()
public static void setAuthorisation(AuthorisationModule auth)
auth
- the authorisation module that will perform the checkspublic static AuthorisationModule getAuthorisation()
public P2Object create(P2Object source, java.lang.String operation, P2Object... args) throws Ponder2Exception
create
in interface Ponder2Message
create
in class P2Object
source
- the subject OID of the operationoperation
- the name of the operationargs
- arguments for the operation
Ponder2Exception
public P2Object operation(P2Object source, java.lang.String operation, P2Object... args) throws Ponder2Exception
operation
in interface Ponder2Message
operation
in class P2Object
source
- the subject OID of the operationoperation
- the name of the operationargs
- arguments for the operation
Ponder2Exception
Ponder2Message.operation(net.ponder2.objects.P2Object,
java.lang.String, net.ponder2.objects.P2Object[])
protected static void trace(java.lang.String opType, java.lang.String className, java.lang.String operation, P2Object... args)
opType
- the type of the operation, mainly "P2Op"className
- the class receiving the operationoperation
- the name of the operationargs
- the arguments for the operationpublic void getCreateOrStaticOperation(P2ObjectAdaptor.CreateOrStaticOperation opInfo) throws Ponder2OperationException
Ponder2OperationException
public P2ObjectAdaptor.CreateOperation getCreateOperation(java.lang.String opName) throws Ponder2OperationException
Ponder2OperationException
public P2ObjectAdaptor.InstanceOperation getInstanceOperation(java.lang.String opName) throws Ponder2OperationException
Ponder2OperationException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
protected java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
- if something happenspublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public com.twicom.qdparser.TaggedElement writeXml(java.util.Set<P2Object> written) throws Ponder2OperationException
writeXml
in interface P2Serializable
writeXml
in class P2Object
Ponder2OperationException
public P2Object readXml(com.twicom.qdparser.TaggedElement xml, java.util.Map<java.lang.Integer,P2Serializable> read) throws Ponder2OperationException, Ponder2ArgumentException
readXml
in interface P2Serializable
readXml
in class P2Object
Ponder2OperationException
Ponder2ArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |