|
TPTP 4.4.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.hyades.execution.invocation.Marshaller
This class knows how to marshal and unmarshal method calls.
No instances of this class can be created. All data members are class (static
)members and all methods are class methods. This class will be loaded in both
the local and remote VMs, and all of its state will be properly initialized
when the class is loaded.
| Method Summary | |
|---|---|
static void |
addInstanceToMap(java.lang.Integer uniqueId,
java.lang.Object instance)
Add an object to the instance map. |
static java.lang.Object |
getInstanceFromMap(java.lang.Integer uniqueId)
Get an object from the instance map. |
static boolean |
isReturnDataAvailable()
Are there any return values in the queue? |
static byte[] |
marshalMethodCall(CallData callData)
Marshals a method call into a byte[]. |
static byte[] |
marshalReturnValue(ReturnData rtnData)
Marshals the return value from a method call into a byte[].
|
static ReturnData |
peekReturnValue()
Get a copy of the return value at the front of the queue. |
static void |
queueReturnValue(ReturnData value)
Add the result of a method invocation to the return data queue. |
static void |
removeInstanceFromMap(java.lang.Integer uniqueId)
Remove an object from the instance map. |
static CallData |
unmarshalMethodCall(byte[] callData)
Unmarshals a method call into a CallData instance. |
static ReturnData |
unmarshalReturnValue(byte[] data)
Unmarshals the result of a method call into a ReturnData
instance. |
static ReturnData |
unqueueReturnValue()
Pull the result of a method invocation off of the return data queue. |
static void |
waitForReturnData()
Deprecated. use waitForReturnDataWithTimeout so you can distinguish between return data received and timeout exceeded condition |
static void |
waitForReturnDataWithTimeout()
Wait until there is data in the return queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void addInstanceToMap(java.lang.Integer uniqueId,
java.lang.Object instance)
uniqueId - instance - public static java.lang.Object getInstanceFromMap(java.lang.Integer uniqueId)
uniqueId -
public static void removeInstanceFromMap(java.lang.Integer uniqueId)
uniqueId -
public static byte[] marshalMethodCall(CallData callData)
throws java.io.IOException
byte[]. The data is
serialized as follows:
int.
Class objects representing the method
argument types. For methods that do not accept arguments, this is a
zero-length array.
Object s that are the arguments of the
method to be invoked. For methods that do not accept arguments, this is a
zero-length array.
String.
callData -
java.io.IOException
public static CallData unmarshalMethodCall(byte[] callData)
throws java.io.IOException,
java.lang.ClassNotFoundException
CallData instance. The
order of objects expected in the input byte array are specified in the
documentation for marshalMethodCall.
callData -
java.io.IOException
java.lang.ClassNotFoundExceptionmarshalMethodCall(CallData)
public static byte[] marshalReturnValue(ReturnData rtnData)
throws java.io.IOException
byte[].
The data is serialized as follows:
int.
Class objects representing the method
argument types. For methods that do not accept arguments, this is a
zero-length array.
String.
int constants defined in
this class.
Object that is the value
returned as a result of the method invocation.
java.io.IOException
public static ReturnData unmarshalReturnValue(byte[] data)
throws java.io.IOException,
java.lang.ClassNotFoundException
ReturnData
instance. The order of objects expected in the input byte array are
specified in the documentation for marshalReturnValue.
data -
java.io.IOException
java.lang.ClassNotFoundExceptionmarshalReturnValue(ReturnData)public static void queueReturnValue(ReturnData value)
value - public static ReturnData unqueueReturnValue()
public static ReturnData peekReturnValue()
public static boolean isReturnDataAvailable()
public static void waitForReturnData()
public static void waitForReturnDataWithTimeout()
throws java.lang.InterruptedException
java.lang.InterruptedException - if the return data timeout is exceeded
|
TPTP 4.4.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||