Rule Execution Server API

ilog.rules.bom.serializer
Class IlrAbstractSerializer

java.lang.Object
  extended by ilog.rules.bom.serializer.IlrAbstractSerializer
All Implemented Interfaces:
IlrSerializer
Direct Known Subclasses:
IlrJavaSerializer, IlrXMLSerializer

public abstract class IlrAbstractSerializer
extends Object
implements IlrSerializer

This abstract serializer provides an implementation of the methods that are used to read and write object models. However, the implementation of the read and write operations are left to the implementation of this class.


Constructor Summary
IlrAbstractSerializer()
           
 
Method Summary
 ClassLoader getClassLoader()
          Returns the class loader set by a call to setClassLoader.
 boolean isCompactMode()
          Returns true if compact mode is enabled when writing an object model.
 boolean isJavaClassLookupEnabled()
          Returns true if Java class lookup is enabled when reading an object model definition.
 void setClassLoader(ClassLoader classLoader)
          Sets the class loader used by the serializer to define native classes.
 void setCompactMode(boolean compactMode)
          Sets compact mode to compactMode.
 void setJavaClassLookupEnabled(boolean classLookupEnabled)
          Enables or disables Java class lookup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.rules.bom.serializer.IlrSerializer
getName, readObjectModel, writeObjectModel, writeObjectModel, writeObjectModel
 

Constructor Detail

IlrAbstractSerializer

public IlrAbstractSerializer()
Method Detail

getClassLoader

public ClassLoader getClassLoader()
Returns the class loader set by a call to setClassLoader.

Specified by:
getClassLoader in interface IlrSerializer

setClassLoader

public void setClassLoader(ClassLoader classLoader)
Sets the class loader used by the serializer to define native classes. If the class loader is null then the Class.forName method is used to load classes.

Initially this property is null.

Specified by:
setClassLoader in interface IlrSerializer

isJavaClassLookupEnabled

public boolean isJavaClassLookupEnabled()
Returns true if Java class lookup is enabled when reading an object model definition. When enabled, classes declared as native are mapped to the corresponding Java class.

Initially this property is false.

Specified by:
isJavaClassLookupEnabled in interface IlrSerializer

setJavaClassLookupEnabled

public void setJavaClassLookupEnabled(boolean classLookupEnabled)
Enables or disables Java class lookup.

Specified by:
setJavaClassLookupEnabled in interface IlrSerializer

isCompactMode

public boolean isCompactMode()
Returns true if compact mode is enabled when writing an object model. When enabled classes bound to actual Java classes (those for which IlrType.getJavaClass has a non null return value) are not written to the output stream by the writeObjectModel method.

Note that when reading streams that were produced in compact mode, Java class lookup must be enabled (see setJavaClassLookupEnabled.

Initially this property is not enabled.

Specified by:
isCompactMode in interface IlrSerializer

setCompactMode

public void setCompactMode(boolean compactMode)
Sets compact mode to compactMode.

Specified by:
setCompactMode in interface IlrSerializer

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013