ConfigurablePofContext Class | 
Namespace: Tangosol.IO.Pof
public class ConfigurablePofContext : IPofContext, ISerializer, IXmlConfigurable
The ConfigurablePofContext type exposes the following members.
| Name | Description | |
|---|---|---|
| ConfigurablePofContext | 
            Default constructor.
              | |
| ConfigurablePofContext(Stream) | 
            Create a ConfigurablePofContext that will use the passed
            configuration information.
              | |
| ConfigurablePofContext(String) | 
            Create a ConfigurablePofContext that will load
            configuration information from the specified locator.
              | |
| ConfigurablePofContext(ConfigurablePofContext) | 
            Create a copy of ConfigurablePofContext from the given one.
              | |
| ConfigurablePofContext(IXmlElement) | 
            Create a ConfigurablePofContext that will use the passed
            configuration information.
              | 
| Name | Description | |
|---|---|---|
| Config | IXmlElement holding configuration information.
              | |
| ConfigLocation | 
            Obtain the location of the configuration that the
            ConfigurablePofContext used to configure itself.
              | |
| DefaultPofConfig | 
            The default XML configuration used when one isn't explicitly passed
            in the constructor for this class.
              | |
| DefaultPofConfigResource | 
            The IResource for the default XML configuration used
            when one isn't explicitly passed in the constructor for this class.
              | |
| IsInitialized | 
            Determine if the ConfigurablePofContext has completed its
            initialization.
              | |
| IsInterfaceAllowed | 
            Determine if the ConfigurablePofContext supports the
            configuration of user types by specifying an interface (instead
            of a class) for the .NET type.
              | |
| IsReferenceEnabled | 
            Determine if Identity/Reference type support is enabled for this
            ConfigurablePofContext.
              | |
| IsSubclassAllowed | 
            Determine if the ConfigurablePofContext supports the
            serialization of an object that is an instance of a sub-class of
            a configured type, but not actually an instance of a class of a
            configured type.
              | 
| Name | Description | |
|---|---|---|
| AppendDefaultSerializerToUserTypes | 
            Process <default-serializer> element from specified xml
            configuration and appends information about serializer to each
            <user-type> element within <user-type-list> unless
            user type already has serializer specified.
              | |
| CheckNotInitialized | 
            Verify that the ConfigurablePofContext has not already
            been initialized.
              | |
| CreatePofConfig | 
            Create a ConfigurablePofContextPofConfig object based on a configuration
            that was either provided as XML, or can be loaded from the
            specified (or default) URI.
              | |
| Deserialize | 
            Deserialize an object from a stream by reading its state using
            the specified DataReader object.
              | |
| EnsureInitialized | 
            Fully initialize the ConfigurablePofContext if it has not
            already been initialized.
              | |
| Equals | (Inherited from Object.) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.  (Inherited from Object.) | |
| GetHashCode | Serves as a hash function for a particular type.   (Inherited from Object.) | |
| GetInheritedUserTypeIdentifier | 
            Helper method for determining the user type identifier associated
            with a given class that does not have a direct configured
            association.
              | |
| GetPofConfig | 
            Obtain the ConfigurablePofContextPofConfig that represents the
            initialized state of the ConfigurablePofContext.
              | |
| GetPofSerializer | 
            Return an IPofSerializer that can be used to
            serialize and deserialize an object of the specified user type to
            and from a POF stream.
              | |
| GetSerializer | 
            Returns serializer for user type specified by
            xmlType.
              | |
| GetType | Gets the Type of the current instance.  (Inherited from Object.) | |
| GetType(Int32) | 
            Determine the type associated with the given user type
            identifier.
              | |
| GetTypeName | 
            Determine the name of the type associated with a user type
            identifier.
              | |
| GetUserTypeIdentifier(Object) | 
            Determine the user type identifier associated with the given
            object.
              | |
| GetUserTypeIdentifier(String) | 
            Determine the user type identifier associated with the given type
            name.
              | |
| GetUserTypeIdentifier(Type) | 
            Determine the user type identifier associated with the given
            type.
              | |
| GetUserTypeIdentifierInternal(String) | 
            Determine the user type identifier associated with the given type
            name.
              | |
| GetUserTypeIdentifierInternal(Type) | 
            Determine the user type identifier associated with the given
            type.
              | |
| Initialize | 
            Bind the ConfigurablePofContext to a URI of the
            configuration file, resolving all type names, etc.
              | |
| IsUserType(Object) | 
            Determine if the given object is of a user type known to this
            IPofContext.
              | |
| IsUserType(String) | 
            Determine if the type with the given name is a user type known to
            this IPofContext.
              | |
| IsUserType(Type) | 
            Determine if the given type is a user type known to this
            IPofContext.
              | |
| LoadDefaultPofConfig | 
            Load and return the default XML POF configuration.
              | |
| MemberwiseClone | Creates a shallow copy of the current Object.  (Inherited from Object.) | |
| ResolveType | 
            Returns Type specified by xmlType with
            configuration information.
              | |
| Serialize | 
            Serialize an object to a stream by writing its state using the
            specified DataWriter object.
              | |
| ThrowException | 
            Assemble and throw an informative exception based on the passed
            details.
              | |
| ToString | Returns a string that represents the current object.  (Inherited from Object.) | 
For each user type supported by this POF context, it must be provided with:
The format of the configuration XML is as follows:
             <pof-config>
               <user-type-list>
               ..
                 <user-type>
                   <type-id>53</type-id>
                   <class-name>My.Example.Data.Trade, MyAssembly</class-name>
                   <serializer>
                     <class-name>Tangosol.IO.Pof.PortableObjectSerializer, Coherence</class-name>
                     <init-params>
                       <init-param>
                         <param-type>System.Int32</param-type>
                         <param-value>{type-id}</param-value>
                       </init-param>
                     </init-params>
                   </serializer>
                 </user-type>
            
                 <user-type>
                   <type-id>54</type-id>
                   <class-name>My.Example.Data.Position, MyAssembly</class-name>
                 </user-type>
            
               ..
               <include>file:/my-pof-config.xml</include>
            
               ..
               </user-type-list>
            
               <allow-interfaces>false</allow-interfaces>
               <allow-subclasses>false</allow-subclasses>
            
               <default-serializer>
                 <class-name>Tangosol.IO.Pof.XmlPofSerializer, Coherence</class-name>
                 <init-params>
                   <init-param>
                     <param-type>System.Int32</param-type>
                     <param-value>{type-id}</param-value>
                   </init-param>
                 </init-params>
               </default-serializer>
             </pof-config>
             For each user type, a user-type element must exist inside the user-type-list element. The user-type-list element contains up to three elements, in the following order:
The optional include element allows user-type elements defined in another configuration XML to be added to the user type list. The value of this element is a locator string (either a valid path or URL) that specifies the location of the target IPofContext configuration file. The user-type elements of the target file are imported verbatum; therefore, if the included elements contain explicit type identifiers, each identifier must be unique with respect to the the user type identifiers (either explicit or generated) defined within the including file. If the included user types do not contain explicit type identifiers, then the type identifiers will be based on the order in which the user types appear in the composite configuration file. Multiple include elements may be used within a single user-type-list element.
In order to be used by the ConfigurablePofContext, a IPofSerializer implementation must provide a public constructor that accepts the parameters detailed by the init-params element. The parameter values, as specified by the param-value element, can specify one of the following substitutable values:
If the init-params element is not present, then the ConfigurablePofContext attempts to construct the IPofSerializer by searching for one of the following constructors in the same order as they appear here:
Once constructed, if the IPofSerializer implements the IXmlConfigurable interface, the Config property is set to the passed XML information, transposed as described by TransformInitParams(IXmlElement, IXmlElement), and as described in the pof-config.xsd file.