public class POPObject extends java.lang.Object implements IPOPBase
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
definedMethodId |
protected boolean |
generateClassId |
protected ObjectDescription |
od |
protected int |
refCount |
| Constructor and Description |
|---|
POPObject()
Creates a new instance of POPObject
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSemantic(java.lang.Class<?> c,
java.lang.String methodName,
int semantic)
Set an invocation semantic to a specific method.
|
void |
addSemantic(java.lang.Class<?> c,
java.lang.String methodName,
int semantic,
java.lang.Class<?>... parameterTypes)
Set an invocation semantic to a specific method that is overloaded
|
boolean |
canKill()
Ask if the object can be killed
|
protected void |
defineConstructor(java.lang.Class<?> c,
int constructorId,
java.lang.Class<?>... paramTypes)
Define information about a constructor
|
protected void |
defineMethod(java.lang.Class<?> c,
java.lang.String methodName,
int methodId,
int semanticId,
java.lang.Class<?>... paramTypes)
Define informations about a method
|
boolean |
deserialize(Combox<?> sourceCombox,
POPBuffer buffer) |
boolean |
deserialize(POPBuffer buffer)
Deserialize the object from the buffer
|
void |
exit()
Exit method
|
protected void |
finalize() |
POPAccessPoint |
getAccessPoint()
Retrieve the access point of the parallel object
|
Broker |
getBroker() |
int |
getClassId()
Get the class unique identifier
|
java.lang.String |
getClassName()
Retrieve the class name of the parallel object
|
java.lang.reflect.Constructor<?> |
getConstructorByInfo(MethodInfo info)
Retrieve a constructor by its informations
|
java.lang.reflect.Method |
getMethodByInfo(MethodInfo info)
Retrieve a specific method in the parallel class with some information
|
MethodInfo |
getMethodInfo(java.lang.reflect.Constructor<?> constructor)
Retrieve a specific method by its constructor informations
|
MethodInfo |
getMethodInfo(java.lang.reflect.Method method)
Retrieve a method by its informations
|
ObjectDescription |
getOd()
Get the object description of the POPObject
|
java.lang.String |
getPOPCReference()
Return the reference of this object with a POP-C++ format
|
int |
getSemantic(java.lang.reflect.Method method)
Retrieve the invocation semantic of a specific method
|
int |
getSemantic(MethodInfo methodInfo)
Retrieve the invocation semantic of a specific method
|
<T> T |
getThis() |
<T> T |
getThis(java.lang.Class<T> myClass) |
POPTracking |
getTracked()
Get the resources used until now by caller.
|
POPTracking |
getTracked(POPRemoteCaller caller)
Get the resources used by an user.
|
POPRemoteCaller[] |
getTrackedUsers()
Get the tracked user list.
|
protected boolean |
hasDestructor()
Return the value of the hasDestrcutor variable
|
protected void |
hasDestructor(boolean hasDestructor)
Set the destructor value.
|
protected void |
initializeConstructorInfo(java.lang.Class<?> c)
Initialize the constructor identifier and the semantic
|
protected void |
initializeMethodInfo(java.lang.Class<?> c)
Initialize the method identifier for all the methods in a class
|
protected void |
initializePOPObject()
Initialize the method identifiers of a POPObject
|
boolean |
isDaemon()
Specify if the parallel object is running like a deamon
|
boolean |
isTemporary() |
boolean |
isTracking()
Is tracking enabled on the remote object.
|
void |
loadPOPAnnotations(java.lang.reflect.Constructor<?> constructor,
java.lang.Object... argvs) |
<T extends POPObject> |
makePermanent() |
void |
makeTemporary() |
void |
PopRegisterFutureConnectorCertificate(byte[] cert)
Register a certificate on the node TODO Handle this method for other kind of
Combox (only SSL ATM)
|
void |
printMethodInfo()
Print object information on the standard output
|
boolean |
serialize(POPBuffer buffer)
Serialize the object into the buffer
|
void |
setBroker(Broker broker) |
protected void |
setClassId(int classId)
Set the class unique identifier
|
protected void |
setClassName(java.lang.String className)
Set the class name
|
void |
setOd(ObjectDescription od)
Set a new object description to the POPObject
|
protected int refCount
protected boolean generateClassId
protected boolean definedMethodId
protected ObjectDescription od
public void loadPOPAnnotations(java.lang.reflect.Constructor<?> constructor,
java.lang.Object... argvs)
protected final void initializePOPObject()
public boolean isDaemon()
public final boolean canKill()
public final ObjectDescription getOd()
public final void setOd(ObjectDescription od)
od - the new object descriptionpublic POPAccessPoint getAccessPoint()
public Broker getBroker()
public final java.lang.String getClassName()
protected final void setClassName(java.lang.String className)
className - the class nameprotected final boolean hasDestructor()
protected final void hasDestructor(boolean hasDestructor)
hasDestructor - set to true if the parclass has a destructorpublic final int getClassId()
protected final void setClassId(int classId)
classId - the class unique identifierpublic java.lang.reflect.Method getMethodByInfo(MethodInfo info) throws java.lang.NoSuchMethodException
info - informations about the method to retrievejava.lang.NoSuchMethodException - thrown is the method is not foundpublic java.lang.reflect.Constructor<?> getConstructorByInfo(MethodInfo info) throws java.lang.NoSuchMethodException
info - Informations about the constructor to retrievejava.lang.NoSuchMethodException - thrown if no constrcutor is foundpublic MethodInfo getMethodInfo(java.lang.reflect.Method method)
method - Informations about the method to retrievepublic MethodInfo getMethodInfo(java.lang.reflect.Constructor<?> constructor)
constructor - Informations about the constructorpublic int getSemantic(MethodInfo methodInfo)
methodInfo - informations about the specific methodpublic int getSemantic(java.lang.reflect.Method method)
method - method to look atpublic final void addSemantic(java.lang.Class<?> c,
java.lang.String methodName,
int semantic)
c - class of the methodmethodName - method to modifysemantic - semantic to set on the methodpublic final void addSemantic(java.lang.Class<?> c,
java.lang.String methodName,
int semantic,
java.lang.Class<?>... parameterTypes)
throws java.lang.NoSuchMethodException
c - class of the methodmethodName - method to modifysemantic - semantic to set on the methodparameterTypes - parameters types of the methodjava.lang.NoSuchMethodException - if the method name is not foundprotected void initializeMethodInfo(java.lang.Class<?> c)
c - class to initializeprotected void initializeConstructorInfo(java.lang.Class<?> c)
c - class to initializeprotected void defineMethod(java.lang.Class<?> c,
java.lang.String methodName,
int methodId,
int semanticId,
java.lang.Class<?>... paramTypes)
c - Class of the methodmethodName - Name of the methodmethodId - Unique identifier of the methodsemanticId - Semantic applied to the methodparamTypes - Parameters of the methodprotected void defineConstructor(java.lang.Class<?> c,
int constructorId,
java.lang.Class<?>... paramTypes)
c - Class of the constructorconstructorId - Unique identifier of the constructorparamTypes - Parameters of the constructorpublic boolean deserialize(POPBuffer buffer)
deserialize in interface IPOPBasebuffer - The buffer to deserialize frompublic boolean serialize(POPBuffer buffer)
public void exit()
public void printMethodInfo()
public java.lang.String getPOPCReference()
public boolean isTemporary()
public void makeTemporary()
public <T extends POPObject> T makePermanent()
public void setBroker(Broker broker)
public <T> T getThis(java.lang.Class<T> myClass)
public <T> T getThis()
public void PopRegisterFutureConnectorCertificate(byte[] cert)
cert - the certificate to save locallypublic POPRemoteCaller[] getTrackedUsers()
public POPTracking getTracked(POPRemoteCaller caller)
caller - the identifier we want connection details ofpublic POPTracking getTracked()
public boolean isTracking()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable