package com.ericfeminella.net
{
/**
*
* Defines the contract for serializing / deserializing AMF
* encoded classes in order to preserve and retain type
*
*/
public interface IAMFSerializable
{
/**
*
* Sets the value of a specified persisted property and
* encodes the properties Alias to preserve type. Use this
* method if you will need to preserve type information of
* a persisted object.
*
* <p>
* Preserves the class (type) information of an object when
* the object is encoded in Action Message Format (AMF). When
* you persist a property in a shared object the properties
* are encoded into AMF. When reading any properties encoded
* in AMF, the type information is lost and the property is
* returned as an anonymous object. Use this, method so that
* you can recover the class when decoding the object.
* </p>
*
* <p>
* Classes that implement IAMFSerializable use the property
* name as the alias for the encoded class. You can then use
* the property name to retrieve the class of an encoded property
* </p>
*
* @param the name of the persisted property, this will also be
* used as the alias
* @param the vlaue of the persisted property
* @param the class (type) of the property to be persisted
*
*/
function setEncodedPersistedProperty(propertyName:String, value:*, classReference:Class) : void
/**
*
* Decodes a previously encoded ActionScript class
*
* @param the alias used to retieve the class type
* @return the class encoded via IAMFAliasSerialization.encode();
*
*/
function getDecodedPersistedPropertyClass(propertyName:String) : Class
}
}