| Business Objects and Data Sources > States > Defining States in XML > Trap States |
Trap States |
INDEX
PREVIOUS
NEXT
|
The class IltTrapObjectStateSAXInfo is the XML serialization class that allows you to read and write traps in the XML format.
The following table describes the XML elements that can be used.
<addObject id="NE2">
<class>ilog.tgo.model.IltNetworkElement</class>
<attribute name="name">NE2</attribute>
<attribute name="type">Mainframe</attribute>
<attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint">
<x>229</x> <y>126</y>
</attribute>
<attribute name="objectState" javaClass="ilog.tgo.model.IltSNMPObjectState">
<state>Up</state>
<traps>
<new type="LinkFailure">5</new>
<ack type="AuthenticationFailure">2</ack>
</traps>
</attribute>
</addObject>
The following example shows how to set traps to an object that already exists in the data source. You can achieve this by using the XML tag <updateObject> to modify the attribute objectState:
<updateObject id="NE1">
<attribute name="objectState" javaClass="ilog.tgo.model.IltSNMPObjectState">
<state>Up</state>
<traps>
<new type="LinkFailure">2</new>
<ack type="AuthenticationFailure">3</ack>
</traps>
</attribute>
</updateObject>
<updateObject id="NE1">
<updateState>
<traps>
<new type="ColdStart">1</new>
<new type="LinkFailure" operation="remove">1</new>
<new type="AuthenticationFailure" operation="add">1</new>
<ack severity="LinkFailure" operation="add">1</ack>
<ack severity="AuthenticationFailure" operation="remove">3</ack>
</traps>
</updateState>
</updateObject>
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |