|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Externalizer
Extended interface that extends capabilities of writing predefined objects
with the possibility of reading them. Any new externalizer implementations
should implement this interface. Implementations are free to write class
information to the wire as they wish. See ReplicableCommandExternalizer
for an such example.
To add a new Externalizer
, follow these steps:
1. Create an implementation of Externalizer
.
2. Add class that Externalizer
implementation marshalls to set in
ConstantObjectTable.MARSHALLABLES
3. Annotate the class being marshalled with Marshallable
indicating the
Externalizer
implementation and a unique index number.
Method Summary | |
---|---|
Object |
readObject(ObjectInput input)
Read an instance from the stream. |
void |
writeObject(ObjectOutput output,
Object object)
Write the predefined object reference to the stream. |
Method Detail |
---|
void writeObject(ObjectOutput output, Object object) throws IOException
output
- the object output to write toobject
- the object reference to write
IOException
- if an I/O error occursObject readObject(ObjectInput input) throws IOException, ClassNotFoundException
#writeObject(Object)
method.
input
- the object input to read from
IOException
- if an I/O error occurs
ClassNotFoundException
- if a class could not be found
|
Google Analytics | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |