Show / Hide Table of Contents

Class PrincipalPofSerializer

IPofSerializer implementation that supports the serialization and deserialization of an IPrincipal to and from a POF stream.

Inheritance
object
PrincipalPofSerializer
Implements
IPofSerializer
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Tangosol.IO.Pof
Assembly: Coherence.dll
Syntax
public class PrincipalPofSerializer : IPofSerializer
Remarks

Only the IIdentity associated with the IPrincipal is serialized. All role information encapsulated by the IPrincipal is considered transient.

The PrincipalPofSerializer can serialize any IPrincipal implementation to a POF stream; however, the IPrincipal returned during deserialization is always an instance of SimplePrincipal with an empty role array.

Constructors

PrincipalPofSerializer()

Default constructor.

Declaration
public PrincipalPofSerializer()

Methods

Deserialize(IPofReader)

Deserialize a user type instance from a POF stream by reading its state using the specified IPofReader object.

Declaration
public object Deserialize(IPofReader reader)
Parameters
Type Name Description
IPofReader reader

The IPofReader with which to read the object's state.

Returns
Type Description
object

The deserialized user type instance.

Remarks

An implementation of IPofSerializer is required to follow the following steps in sequence for reading in an object of a user type:

  1. If the object is evolvable, the implementation must get the version by calling VersionId.
  2. The implementation may read any combination of the properties of the user type by using "read" methods of the IPofReader, but it must do so in the order of the property indexes.
  3. After all desired properties of the user type have been read, the implementation must terminate the reading of the user type by calling ReadRemainder().
Exceptions
Type Condition
IOException

If an I/O error occurs.

Serialize(IPofWriter, object)

Serialize a user type instance to a POF stream by writing its state using the specified IPofWriter object.

Declaration
public void Serialize(IPofWriter writer, object o)
Parameters
Type Name Description
IPofWriter writer

The IPofWriter with which to write the object's state.

object o

The object to serialize.

Remarks

An implementation of IPofSerializer is required to follow the following steps in sequence for writing out an object of a user type:

  1. If the object is evolvable, the implementation must set the version by calling VersionId.
  2. The implementation may write any combination of the properties of the user type by using the "write" methods of the IPofWriter, but it must do so in the order of the property indexes.
  3. After all desired properties of the user type have been written, the implementation must terminate the writing of the user type by calling WriteRemainder(Binary).
Exceptions
Type Condition
IOException

If an I/O error occurs.

Implements

IPofSerializer
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.