Managing states
Explains how to change and withdraw the states associated with JViews TGO objects, by showing how to use the state dictionaries.
Introduces the object state classes and explains the naming principles of the states listed in the dictionaries.
Provides a class diagram of the object states classes and lists the dictionaries associated with each object state.
Describes how states are structured and named using the OSI, Bellcore, SNMP, Misc, SONET, Alarm, and Trap object state classes.
Provides examples illustrating how to manage the states and statuses for network elements and links.
Explains how to access and how to remove states with the API.
State values, state classes, and state systems
The Java™ classes introduced by
JViews TGO to implement the concepts in state models are
IltState and
IltStateSystem.
State classes are subclasses of
IltState. Their instances are the state values that will be used to describe the state and alarm condition of a telecom object. Examples of state values are: the primary state of a telecom object, each of its secondary states, or its alarm state.
The state dictionaries are embodied by instances of
IltStateSystem, which gather the related state classes as nested classes.
JViews TGO includes seven state systems:
IltOSI is the gathering class for the OSI state dictionary. The classes nested in
IltOSI are:
IltOSI.State This class implements the OSI primary states. Its instances are triplets, with a member of each of:
IltBellcore is the gathering class for the Bellcore state dictionary. The classes nested in
IltBellcore are:
IltSNMP is the gathering class for the SNMP state dictionary. The classes nested in
IltSNMP are:
IltSNMP.State This class implements the SNMP primary state and its values.
IltSNMP.Interface This class contains the definition of the MIB-II Interface Group states.
IltSNMP.IP This class contains the definition of the states present in the MIB-II IP Group.
IltSNMP.TCP This class contains the definition of the states present in the MIB-II TCP Group.
IltSNMP.UDP This class contains the definition of the states present in the MIB-II UDP Group.
IltSNMP.EGP This class contains the definition of the states present in the MIB-II EGP Group.
IltSNMP.ICMP This class contains the definition of the states present in the MIB-II ICMP Group.
IltSNMP.SNMP This class contains the definition of the states present in the MIB-II SNMP Group.
IltSONET is the gathering class for the SONET state dictionary. The classes nested in
IltSONET are:
IltSONET.Protection This class implements the SONET secondary states, also called protection switch request indicators.
IltMisc is the gathering class for the Misc state dictionary. The only class nested in
IltMisc is:
IltMisc.SecState This class implements the additional secondary states brought in by the Misc state dictionary.
IltPerformance is the gathering class for the Performance state dictionary. The only class nested in
IltPerformance is:
IltPerformance.SecState This class implements the additional secondary states brought in by the Performance state dictionary.
IltSAN is the gathering class for the SAN state dictionary. The only class nested in
IltSAN is:
IltSAN.SecState This class implements the additional secondary states brought in by the SAN state dictionary.
IltAlarm is the gathering class for the Alarm state dictionary. The classes nested in
IltAlarm are:
IltAlarm.State This class implements the alarm state of an object, with the number of new and acknowledged alarms of each severity, plus the Not Reporting and Loss Of Connectivity conditions.
IltAlarm.Severity This class is not a state class. It is an extensible enumeration implementing the raw alarm severities known to
JViews TGO.
IltAlarm.ImpactSeverity This class is not a state class. It is an extensible enumeration implementing the impact alarm severities known to
JViews TGO.
IltTrap is the gathering class for the Trap state dictionary. The classes nested in
IltTrap are:
IltTrap.State This class implements the trap state of an object, with the number of new and acknowledged traps for each type of trap.
IltTrap.Type This class represents the enumeration with the traps known to
JViews TGO.
Composite state values, such as the OSI primary state triplet, or the Alarm collection of integers and Boolean values, are normal Java™ objects. All other state values are statically allocated Java objects implementing symbolic state values. They include:
The operational, usage, and administrative components of the OSI primary state.
The Bellcore, SONET, and SNMP primary states.
The OSI, Bellcore, SNMP, SONET, Performance, and Misc secondary states.
The names of the static data members storing the state values are listed in the tables in
Lookup tables for state visuals.
Object states
The state of a telecom object is described by an
IltObjectState instance stored in the telecom object. This instance is called the
object state of the telecom object. It contains state values corresponding to the primary state, the secondary states, and the alarm or trap state of the telecom object.
When the object state is modified to reflect a change in the telecom equipment state, the graphic representation of the telecom object is automatically recomputed and redisplayed.
Object state classes
There are seven subclasses of
IltObjectState in
JViews TGO. Subclasses are based on the OSI, Bellcore, SNMP and SONET state systems as illustrated in the figure that follows.
Object state classes
This figure shows that each type of object state can hold states and alarms. Alarms systematically complement states with the class
IltAlarmObjectState, dedicated to the objects to which only alarms, and no states, are assigned. This figure also shows that each type of object state can hold states and traps. Traps systematically complement states with the class
IltTrapObjectState, dedicated to the objects to which only traps, and no states, are assigned.
Depending on the state systems (OSI, Bellcore, SNMP, SONET, Alarm, Trap, Misc) that compose the object state, state modeling is performed differently. For example, there are three state attributes in the SONET state system, whereas there are only two in the other state systems. The terminology employed, as well as the structure of the state models themselves, is developed in the next section.
Dictionaries and object states
To choose the set of state dictionaries used to describe the state and alarm condition of a telecom object, select a subclass of
IltObjectState to store the object state. The seven subclasses of
IltObjectState are listed below with the state dictionaries that they gather.
The object state system is supplied as an argument to the constructor of the telecom business object, as in the following code example.
How to supply the state system to the business object
IltNetworkElement berlin =
new IltNetworkElement
("Berlin",
IltNetworkElement.Type.NE,
IltNetworkElement.Function.TransportCrossConnect,
IltNetworkElement.Family.OC12,
new IltBellcoreObjectState());
The object state classes
The OSI-based object state class
IltOSIObjectState is an object state class that provides an OSI primary state, a set of secondary states to be taken from the OSI, Misc, and Performance state dictionaries, and an alarm state from the Alarm state dictionary.
An instance of
IltOSIObjectState thus holds:
The Bellcore-based object state class
IltBellcoreObjectState is an object state class that provides a Bellcore primary state, a set of secondary states to be taken from the Bellcore, Performance, and Misc state dictionaries, and an alarm state from the Alarm state dictionary.
An instance of
IltBellcoreObjectState thus holds:
The SNMP-based object state class
IltSNMPObjectState is an object state class that provides an SNMP primary state, a set of secondary states to be taken from the SNMP, Performance and Misc state dictionaries, and a trap state from the Trap state dictionary.
An instance of
IltSNMPObjectState thus holds:
The SONET-based object state class
IltSONETObjectState and
IltBiSONETObjectState are object state classes that provide one or two SONET primary states respectively, two sets of protection switch request indicators, a secondary state taken from the Performance state dictionary if needed and one alarm state. They are dedicated to links, typically links in SONET rings.
An instance of
IltSONETObjectState thus holds:
The protection switch request indicators that have been set on one end of the link, as a list of instances of
IltSONET.ProtectionThe protection switch request indicators that have been set on the other end of the link, as a second list of instances of
IltSONET.ProtectionAn instance of
IltBiSONETObjectState holds:
A second instance of
IltSONET.State, to store the state of the link in the reverse direction.
On a link with a BiSONET object state, the inherited primary state is considered to be the state of the direct direction and is graphically represented by the inner part of the link base and the “to” arrow. The reverse state is represented by the outer part of the link base and the “from” arrow.
The Alarm-only object state class
IltAlarmObjectState is an object state class that provides only an alarm state from the Alarm state dictionary. It is intended for objects with no states.
An instance of
IltAlarmObjectState thus holds only an instance of
IltAlarm.State.
The Trap-only object state class
IltTrapObjectState is an object state class that provides only a trap state from the Trap state dictionary. It is intended for objects with no states.
An instance of
IltTrapObjectState thus holds only an instance of
IltTrap.State.
Modifying states and statuses
Setting a network element state in the OSI state system
The following code shows how to modify the usage state of the neast node and set it to the active value:
neast.setState(IltOSI.State.Usage.Active);
The
Active symbol is the name of a global variable that contains a state value. This value is an instance of the
IltOSI.State.Usage class (which is itself an
IltState subclass).
Setting network element states in the Bellcore state system
The following code fragment shows how to change the primary state of the berlin node to EnabledActive and how to set the Busy secondary state on this node:
berlin.setState(IltBellcore.State.EnabledActive);
berlin.setState(IltBellcore.SecState.Busy);
Note that the use of the functional interface is the same for all the telecom object classes and the state systems.
Setting network element states in the SNMP state system
The following code fragment shows how to change the primary state of the berlin node to Shutdown and how to set the Interface.InOctets secondary state on this node. This code is an extract from the snmp sample in the distribution.
How to change the primary state of a node and set the secondary state
berlin.setState(IltSNMP.State.Shutdown);
berlin.setState (IltMisc.SecState.TestFailed);
berlin.set (IltSNMP.Interface.InOctets, new Integer (123));
In the SNMP state dictionary, most of the states have numeric values. In order to set the values for these states you can use either
IltSNMPObjectState or
IltObject. Both of these APIs provide methods to set and retrieve the value of a numeric state.
set sets the value of the given state.
get returns the value of the given state.
Besides the numeric and Boolean states present in the SNMP state dictionary, there is also a set of information that is related to the system being managed and that is defined in the MIB-II System Group. The information in the group is displayed in a System window (explained in detail in
System window). The graphical representation of this information is an icon that, when clicked, opens the System window containing the list of all the attributes set in the telecom object. For information regarding the insertion of new attributes, see
Creating a new attribute in the System group.
The following code extract shows how to change the values of the attributes defined by the System Group.
How to change the attribute values defined by the system group
IltSNMPObjectState objstate = (IltSNMPObjectState) berlin.getObjectState();
IltSNMP.SystemInfo sysinfo = objstate.getSystemInfo();
Sysinfo.setDescription ("Berlin station");
Sysinfo.setContact ("John Doe");
Setting link states
In this example, we modify the berlin_west link, which uses the SONET state system.
How to set link states
berlin_west.setState(IltSONET.State.Active);
Accessing and removing states
In addition to the API used to assert states, another API is available for accessing and removing states. Most of the functions for accessing states are available from the class
IltObject.
For example, the Boolean predicate hasState can be used to verify whether the telecom object is in a given state. In all the following examples, neast is the variable that contains the network element North East.
neast.hasState(IltOSI.State.Usage.Idle);
Sometimes, specific accesses are granted using the functional interfaces on the classes
IltObjectState and
IltState. The following code shows how to access the state object and then set the accessors for retrieving a given state.
How to access a state object and set accessors for retrieving a state
IltOSIObjectState osiObjectState =
(IltOSIObjectState)neast.getObjectState();
IltOSI.State osiState = osiObjectState.getState();
osiState.getOperationalState();
osiState.getUsageState();
osiState.getAdministrativeState();
When primary or secondary states are added, the same functional interface is used, but with different consequences. The primary state is unique (in the OSI state system, it is a triplet; in the Bellcore state system, it is a single value), as opposed to secondary states (for example, the values associated with the Misc dictionary can be added without limitation). Consequently, when the member function setState is used, this function replaces the primary state, although it adds one more secondary state. There are two ways to remove states created in this way:
You can use the
clearState member function, which removes secondary states
or resets the primary state to its default value.
You can use the
resetState member function, which removes all the secondary states
and resets the primary state to its default value.
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.