|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.util.Marshaller
public class Marshaller
Marshaller used by SystemServiceHandler
and SystemServiceProxy.
It (un)marshalls the method invocations between the proxy and handler and
(un)marshalls return results. Every invocation/result is identified by
a reference ID. This id is used to match invocations and the corresponding
results.
The marshallers are optimized to re-use any ObjectInputStream and ObjectOutputStreams.
(creating such objects can be costly, especially when they are used very often.
They use MyObjectInputStream and MyObjectOutputStream as specialized
streams that do not write any stream headers, so they can be reused more easily.
| Nested Class Summary | |
|---|---|
static class |
Marshaller.MethodInvocation
|
static class |
Marshaller.MethodResults
|
| Method Summary | |
|---|---|
protected void |
finalize()
|
static Marshaller |
getInstance()
|
int |
getRefId(byte[] bytearray)
Returns the refId of a request or reply that must have been generated by marshallInvocation
or marshallResults. |
byte[] |
marshallInvocation(java.lang.Object ProxiedObject,
java.lang.reflect.Method M,
java.lang.Object[] Args,
int refId)
|
byte[] |
marshallObject(java.lang.Object o)
Generic method to marshall an Object to a byte array. |
byte[] |
marshallResults(boolean IsException,
java.lang.Object Results,
int refId)
|
static void |
releaseInstance(Marshaller m)
|
void |
unmarshallInvocation(byte[] Request,
Marshaller.MethodInvocation mi)
|
java.lang.Object |
unmarshallObject(byte[] array)
Generic method to unmarshall an Object from a byte array. |
java.lang.Object |
unmarshallObject(byte[] array,
java.lang.ClassLoader loader)
Generic method to unmarshall an Object from a byte array using a specified classloader. |
void |
unmarshallResults(byte[] Results,
Marshaller.MethodResults mr)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Marshaller getInstance()
public static void releaseInstance(Marshaller m)
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable
public byte[] marshallInvocation(java.lang.Object ProxiedObject,
java.lang.reflect.Method M,
java.lang.Object[] Args,
int refId)
throws java.io.IOException
java.io.IOException
public void unmarshallInvocation(byte[] Request,
Marshaller.MethodInvocation mi)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public byte[] marshallResults(boolean IsException,
java.lang.Object Results,
int refId)
throws java.io.IOException
java.io.IOException
public void unmarshallResults(byte[] Results,
Marshaller.MethodResults mr)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public int getRefId(byte[] bytearray)
throws java.io.IOException
marshallInvocation
or marshallResults.
bytearray - request or reply for which refId must be returned
java.io.IOException
public byte[] marshallObject(java.lang.Object o)
throws java.io.IOException
o - object to be marshalled
java.io.IOException
public java.lang.Object unmarshallObject(byte[] array)
throws java.io.IOException,
java.lang.ClassNotFoundException
array - marshalled object
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.Object unmarshallObject(byte[] array,
java.lang.ClassLoader loader)
throws java.io.IOException,
java.lang.ClassNotFoundException
array - marshalled object
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||