ilog.tgo.model
Class IltObjectStateSAXInfo

java.lang.Object
  extended by ilog.tgo.model.IltObjectStateSAXInfo
All Implemented Interfaces:
IlpSAXSerializable
Direct Known Subclasses:
IltBellcoreObjectStateSAXInfo, IltOSIObjectStateSAXInfo, IltSNMPObjectStateSAXInfo, IltSONETObjectStateSAXInfo

public abstract class IltObjectStateSAXInfo
extends Object
implements IlpSAXSerializable

XML serialization class for IltObjectState. This class does not allow you to load an IltObjectState from XML as this object state is abstract. However, it provides reading and writing support for miscellaneous shared object state parts (performance and alarms). It reads and writes the following format (inside an object state attribute element):

[<performance state="PPP" [operation="add"|"remove"] [isArray="true"|"false"] [javaClass="Java class"]>XXX</performance>]* [<SAN state="QQQ" [operation="add"|"remove"] [isArray="true"|"false"] [javaClass="Java class"]>XXX</SAN>]* [<misc [operation="add"|"remove"]>MMM</misc>]* [<alarms [operation="set"|"add"|"remove"] [notReporting="true"|"false"] [lossOfConnectivity="true"|"false"]> [<new severity="SSS">NNN</new>]* [<ack severity="SSS">NNN</ack>]* </alarms>] [<traps [operation="set"|"add"|"remove"]> [<new type="TTT">NNN"</new>]* [<ack type="TTT">NNN"</ack>]* </traps>] where:
PPP
stands for the name of a performance state, such as Input.

For the list of possible states, see the section Icon-based Representation of Performance States in the User's Manual.

The performance state may be an array (isArray="true"). It may also be of any Java class, or even an array of an arbitrary Java class. By default, its content XXX is read as a float (not as an array). If it is an array, XXX follows the format described in IlpSAXArrayHandler. Note that in the array case only, the javaClass can be a Java type, such as int.

QQQ
stands for a storage area network state, such as Capacity.

For the list of possible states, see the section Icon-based Representation of Storage Area Network States in the User's Manual.

The handling of arrays is the same as for performance states.

NNN
stands for an integer number.
MMM
stands for the name of a miscellaneous state, such as DoorAjar.

For the list of possible states, see the section Icon-based Representation of Misc States in the User's Manual.

SSS
stands for a severity type, such as Critical.
TTT
stands for a trap type, such as LinkFailure.

For the list of possible types, see the section Alarm Severity Coding in the User's Manual.

Since:
JTGO 3.0

Field Summary
static String ALARMS_TAG
           
static String MISC_TAG
           
static String PERFORMANCE_TAG
           
static String SAN_TAG
           
static String TRAPS_TAG
           
 
Fields inherited from interface ilog.cpl.storage.IlpSAXSerializable
EMPTY_ATTRS
 
Constructor Summary
IltObjectStateSAXInfo()
           
 
Method Summary
abstract  IlpSAXAttributeValueHandler getSAXHandler()
          Returns a SAX handler capable of reading the attribute.
 void output(Object value, IlpTypeConverter typeConverter, ContentHandler outputHandler)
          Outputs the value to an SAX ContentHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MISC_TAG

public static final String MISC_TAG
See Also:
Constant Field Values

PERFORMANCE_TAG

public static final String PERFORMANCE_TAG
See Also:
Constant Field Values

SAN_TAG

public static final String SAN_TAG
See Also:
Constant Field Values

ALARMS_TAG

public static final String ALARMS_TAG
See Also:
Constant Field Values

TRAPS_TAG

public static final String TRAPS_TAG
See Also:
Constant Field Values
Constructor Detail

IltObjectStateSAXInfo

public IltObjectStateSAXInfo()
Method Detail

getSAXHandler

public abstract IlpSAXAttributeValueHandler getSAXHandler()
Returns a SAX handler capable of reading the attribute. To avoid an instance of SAX handler to be used simultaneously by two concurrent threads, this method should either return a new instance of SAX handler each time it is called or take advantage of the java.lang.ThreadLocal class to return a different instance for each thread.

Specified by:
getSAXHandler in interface IlpSAXSerializable
Returns:
A SAX event handler.

output

public void output(Object value,
                   IlpTypeConverter typeConverter,
                   ContentHandler outputHandler)
            throws SAXException
Description copied from interface: IlpSAXSerializable
Outputs the value to an SAX ContentHandler. The method translates the object as SAX ContentHandler method calls.

Specified by:
output in interface IlpSAXSerializable
Parameters:
value - The object to output
typeConverter - The type converter that may be needed to translate values to strings.
outputHandler - The SAX ContentHandler used by this method.
Throws:
SAXException
See Also:
IlpTypeConverter.createStringValue(Class,Object)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.