Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.io.pof
Interface PofContext

All Superinterfaces:
Serializer
All Known Implementing Classes:
ConfigurablePofContext, NullImplementation.NullPofContext, SafeConfigurablePofContext, SimplePofContext

public interface PofContext
extends Serializer

The PofContext interface represents a set of user types that can be serialized to and deserialized from a POF stream.

Since:
Coherence 3.2
Author:
cp/jh 2006.07.11

Method Summary
 java.lang.Class getClass(int nTypeId)
          Determine the class associated with the given user type identifier.
 java.lang.String getClassName(int nTypeId)
          Determine the name of the class associated with the given user type identifier.
 PofSerializer getPofSerializer(int nTypeId)
          Return a PofSerializer that can be used to serialize and deserialize an object of the specified user type to and from a POF stream.
 int getUserTypeIdentifier(java.lang.Class clz)
          Determine the user type identifier associated with the given class.
 int getUserTypeIdentifier(java.lang.Object o)
          Determine the user type identifier associated with the given object.
 int getUserTypeIdentifier(java.lang.String sClass)
          Determine the user type identifier associated with the given class name.
 boolean isUserType(java.lang.Class clz)
          Determine if the given class is a user type known to this PofContext.
 boolean isUserType(java.lang.Object o)
          Determine if the given object is of a user type known to this PofContext.
 boolean isUserType(java.lang.String sClass)
          Determine if the class with the given name is a user type known to this PofContext.

 

Methods inherited from interface com.tangosol.io.Serializer
deserialize, serialize

 

Method Detail

getPofSerializer

PofSerializer getPofSerializer(int nTypeId)
Return a PofSerializer that can be used to serialize and deserialize an object of the specified user type to and from a POF stream.
Parameters:
nTypeId - the type identifier of the user type that can be serialized and deserialized using the returned PofSerializer; must be non-negative
Returns:
a PofSerializer for the specified user type
Throws:
java.lang.IllegalArgumentException - if the specified user type is negative or unknown to this PofContext

getUserTypeIdentifier

int getUserTypeIdentifier(java.lang.Object o)
Determine the user type identifier associated with the given object.
Parameters:
o - an instance of a user type; must not be null
Returns:
the type identifier of the user type associated with the given object
Throws:
java.lang.IllegalArgumentException - if the user type associated with the given object is unknown to this PofContext or if the object is null

getUserTypeIdentifier

int getUserTypeIdentifier(java.lang.Class clz)
Determine the user type identifier associated with the given class.
Parameters:
clz - a user type class; must not be null
Returns:
the type identifier of the user type associated with the given class
Throws:
java.lang.IllegalArgumentException - if the user type associated with the given class is unknown to this PofContext or if the class is null

getUserTypeIdentifier

int getUserTypeIdentifier(java.lang.String sClass)
Determine the user type identifier associated with the given class name.
Parameters:
sClass - the name of a user type class; must not be null
Returns:
the type identifier of the user type associated with the given class name
Throws:
java.lang.IllegalArgumentException - if the user type associated with the given class name is unknown to this PofContext or if the class name is null

getClassName

java.lang.String getClassName(int nTypeId)
Determine the name of the class associated with the given user type identifier.
Parameters:
nTypeId - the user type identifier; must be non-negative
Returns:
the name of the class associated with the specified user type identifier
Throws:
java.lang.IllegalArgumentException - if the specified user type is negative or unknown to this PofContext

getClass

java.lang.Class getClass(int nTypeId)
Determine the class associated with the given user type identifier.
Parameters:
nTypeId - the user type identifier; must be non-negative
Returns:
the class associated with the specified user type identifier
Throws:
java.lang.IllegalArgumentException - if the specified user type is negative or unknown to this PofContext

isUserType

boolean isUserType(java.lang.Object o)
Determine if the given object is of a user type known to this PofContext.
Parameters:
o - the object to test; must not be null
Returns:
true iff the specified object is of a valid user type
Throws:
java.lang.IllegalArgumentException - if the given object is null

isUserType

boolean isUserType(java.lang.Class clz)
Determine if the given class is a user type known to this PofContext.
Parameters:
clz - the class to test; must not be null
Returns:
true iff the specified class is a valid user type
Throws:
java.lang.IllegalArgumentException - if the given class is null

isUserType

boolean isUserType(java.lang.String sClass)
Determine if the class with the given name is a user type known to this PofContext.
Parameters:
sClass - the name of the class to test; must not be null
Returns:
true iff the class with the specified name is a valid user type
Throws:
java.lang.IllegalArgumentException - if the given class name is null

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.