Atavism Version 2018.1AGIS API

atavism.server.marshalling
Interface Marshallable

All Known Implementing Classes:
DCMap, MessageType, Namespace, ObjectTracker.TrackerFilter, ObjectType, OID, PerceptionFilter, SubObjectFilter

public interface Marshallable

This interface specifies the two methods, marshalObject() and unmarshalObject(), that must be implemented by a class that supports marshalling


Method Summary
 void marshalObject(AOByteBuffer buf)
          Marshal the object into the byte buffer argument.
 java.lang.Object unmarshalObject(AOByteBuffer buf)
          Unmarshal from the byte buffer argument, returning an Object that containing the unmarshalled state.
 

Method Detail

marshalObject

void marshalObject(AOByteBuffer buf)
Marshal the object into the byte buffer argument.

Parameters:
buf - The byte buffer

unmarshalObject

java.lang.Object unmarshalObject(AOByteBuffer buf)
Unmarshal from the byte buffer argument, returning an Object that containing the unmarshalled state. Nearly all implementors of Marshallable unmarshall the state into this, and return this. However, some implementors need to "intern" the result of unmarshalling, and will potentially return a value different from this. This provides the functionality of Java Serializable's readResolve() method. Examples in the server of classes that intern objects during unmarshalling include MessageType and Namespace.



Copyright © 2018 Dragonsan Studios Sp. z o.o.