public class PopJava
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
connect(java.lang.Object parentObject,
java.lang.Class<T> targetClass,
java.lang.String networkUUID,
POPAccessPoint accessPoint)
Static method used to connect to an already existing parallel object with a
custom network
|
static void |
destroy(java.lang.Object object)
Destroys a POP object.
|
static void |
disconnect(java.lang.Object object)
Disconnects the POP object without destroying the remove object.
|
static POPAccessPoint |
getAccessPoint(java.lang.Object object) |
static POPRemoteCaller |
getRemote(java.lang.Object object)
Given a Proxy Object (Client) connected to a POP Object (Server) we get the
identifier of the server.
|
static POPRemoteCaller |
getRemoteCaller()
Return the remote source for the call to this method.
|
static <T> T |
getThis(T object) |
static boolean |
isPOPJavaActive()
Returns true if POP-Java is loaded and enabled
|
static <T> T |
newActive(java.lang.Class<T> targetClass,
ObjectDescription objectDescription,
java.lang.Object... argvs)
Static method used to create a new parallel object by passing an object
description
|
static <T> T |
newActive(java.lang.Object parentObject,
java.lang.Class<T> targetClass,
java.lang.Object... argvs)
Static method used to create a new parallel object
|
static <T> T |
newActive(java.lang.Object parentObject,
java.lang.Class<T> targetClass,
POPAccessPoint accessPoint)
Static method used to connect to an already existing parallel object TODO
rename as connect?
|
static <T> T |
newActive(java.lang.Object parentObject,
java.lang.Class<T> targetClass,
POPAccessPoint accessPoint,
java.lang.String networkUUID)
Static method used to connect to an already existing parallel object TODO
rename as connect?
|
static <T> T |
newActiveConnect(java.lang.Object parentObject,
java.lang.Class<T> targetClass,
POPAccessPoint accessPoint) |
static <T> T |
newActiveFromBuffer(Combox<?> sourceCombox,
java.lang.Class<T> targetClass,
POPBuffer buffer)
Static method used to create a parallel object from the buffer
|
static java.lang.Object |
newActiveFromName(java.lang.String targetClass,
java.lang.Object... argvs) |
static POPAccessPoint[] |
newTFCSearch(java.lang.Class<?> targetClass,
int maxInstances,
ObjectDescription od)
Search a live object in the network.
|
static POPAccessPoint[] |
newTFCSearchOn(java.lang.Class<?> targetClass,
java.lang.String networkUUID,
POPNode node)
Make a TFC research on a specific POPNode, the node should be of type
POPNodeAJobManager. |
public static <T> T newActive(java.lang.Class<T> targetClass,
ObjectDescription objectDescription,
java.lang.Object... argvs)
throws POPException
targetClass - the parallel class to be createdobjectDescription - the object description for the resource requirementsargvs - arguments of the constructor (may be empty)POPException - a remote exception, check caused bypublic static java.lang.Object newActiveFromName(java.lang.String targetClass,
java.lang.Object... argvs)
throws POPException,
java.lang.ClassNotFoundException
POPExceptionjava.lang.ClassNotFoundExceptionpublic static <T> T newActive(java.lang.Object parentObject,
java.lang.Class<T> targetClass,
java.lang.Object... argvs)
throws POPException
targetClass - the parallel class to be createdargvs - arguments of the constructor (may be empty)POPException - a remote exception, check caused bypublic static <T> T newActive(java.lang.Object parentObject,
java.lang.Class<T> targetClass,
POPAccessPoint accessPoint,
java.lang.String networkUUID)
throws POPException
targetClass - the parallel class to be createdaccessPoint - access point of the living objectPOPException - a remote exception, check caused bypublic static <T> T newActive(java.lang.Object parentObject,
java.lang.Class<T> targetClass,
POPAccessPoint accessPoint)
throws POPException
targetClass - the parallel class to be createdaccessPoint - access point of the living objectPOPException - a remote exception, check caused bypublic static <T> T newActiveConnect(java.lang.Object parentObject,
java.lang.Class<T> targetClass,
POPAccessPoint accessPoint)
throws POPException
POPExceptionpublic static <T> T connect(java.lang.Object parentObject,
java.lang.Class<T> targetClass,
java.lang.String networkUUID,
POPAccessPoint accessPoint)
targetClass - the parallel class to be creatednetworkUUID - the network that we will try to connect toaccessPoint - access point of the living objectPOPException - a remote exception, check caused bypublic static <T> T newActiveFromBuffer(Combox<?> sourceCombox, java.lang.Class<T> targetClass, POPBuffer buffer) throws POPException
targetClass - the parallel class to be recoveredbuffer - buffer from which the object must be recoveredPOPException - a remote exception, check caused bypublic static POPAccessPoint[] newTFCSearch(java.lang.Class<?> targetClass, int maxInstances, ObjectDescription od)
ObjectDescription od = new ObjectDescription();
od.setNetwork(publishNetworkUUID);
POPAccessPoint[] liveObjects = PopJava.newTFCSearch(TFCObject.class, maxNumInstances, od);
for (POPAccessPoint ap : liveObjects) {
// choose or connect
...
}
TFCObject remote = PopJava.connect(TFCObject.class, publishNetworkUUID, choosenAccessPoint);
targetClass - The class we are looking for remotelymaxInstances - The maximal number of instances we would likeod - Parameters for the research, mainly the network we want to look
intopublic static POPAccessPoint[] newTFCSearchOn(java.lang.Class<?> targetClass, java.lang.String networkUUID, POPNode node)
POPNodeAJobManager.targetClass - the class we are looking fornetworkUUID - in which network we should look fornode - the node we want to make the research onpublic static POPAccessPoint getAccessPoint(java.lang.Object object)
public static <T> T getThis(T object)
public static void destroy(java.lang.Object object)
object - the object to destroypublic static void disconnect(java.lang.Object object)
object - the locally connected object we want to disconnectpublic static boolean isPOPJavaActive()
public static POPRemoteCaller getRemoteCaller()
public static POPRemoteCaller getRemote(java.lang.Object object)
object - the object we want to know the location ofjava.lang.IllegalArgumentException - if the given object is not a POP Object