Non-Performance Monitors and Their Methods

String Monitor

Methods that get runtime data:

  • String getText(); - returns the current value of this monitor

Example

ObjectName name9 = new ObjectName("com.sap.default:name=\"/Applications/Bank Information/General Information/Bank name\",j2eeType=SAP_MonitorPerNode,SAP_J2EEClusterNode=\"\",SAP_J2EECluster=\"\"");
String result9 = (String) mbs.getAttribute(name9, "getText", null, null);

 

State Monitor

Method that returns runtime data:

  • String getState() - returns the current state(value) of this state monitor

Methods that return configuration data:

  • String[] getRedStates(); - returns a String array with all states that are critical and will be marked as red in the monitor tree
  • String[] getYellowStates(); - returns a String array with all states that are not normal, but still not critical, and will be marked as yellow in the monitor tree
  • String[] getGreenStates(); - returns a String array with all states that are normal and will be marked as green in the monitor tree

Example

ObjectName name1 = new ObjectName("com.sap.default:name=\"/Applications/Bank Information/General Information/Bank ranking\",j2eeType=SAP_MonitorPerNode,SAP_J2EEClusterNode=\"\",SAP_J2EECluster=\"\"");
   
String state = (String) mbs.getAttribute(name1, "getState", null, null);
String[] redStates = (String[])mbs.getAttribute(name1, "getRedStates", null, null);
String[] greenStates  = (String[]) mbs.getAttribute(name1, "getGreenStates", null, null);
String[] yellowStates  = (String[]) mbs.getAttribute(name1, "getYellowStates", null, null);
 

 

Table Monitor

Methods that return runtime data:

  • Serializable[][] getEntries(); - returns a two-dimensional array with the contents of the table
  • Serializable entryAt(int rowPos, int colPos); - returns a table entry that has a [row,col] position in the table
  • Serializable[] rowAt(int index); - returns a table row at position index

Method that returns configuration data:

  • Serializable[] getHeader(); - returns the titles of the columns

Example

ObjectName name6 = new ObjectName("com.sap.default:name=\"/Applications/Bank Information/General Information/Counter desks\",j2eeType=SAP_MonitorPerNode,SAP_J2EEClusterNode=\"\",SAP_J2EECluster=\"\"");
Serializable[][] result6_1 = (Serializable[][]) mbs.getAttribute(name6, "getEntries", null, null);
    
Serializable[] result6_2 = (Serializable[]) mbs.getAttribute(name6, "getHeader", null, null);
     
Serializable result6_3 = (Serializable) mbs.invoke(name6, "entryAt", new Object []{new Integer(1),new Integer(1)}, new String[] {"int","int"});
     
Serializable[] result6_4 = (Serializable[]) mbs.invoke(name6, "rowAt", new Object[]{new Integer(1)}, new String[]{"int"});
 

 

Version Monitor

Methods that get runtime data:

  • String[][] getVersionInfo(); - returns version info as a table

Example

ObjectName name10 = new ObjectName("com.sap.default:name=\"/Applications/Bank Information/General Information/Software version\",j2eeType=SAP_MonitorPerNode,SAP_J2EEClusterNode=\"\",SAP_J2EECluster=\"\"");
String[][] result10 = (String[][]) mbs.getAttribute(name10, "getVersionInfo", null, null);
 

 

Configuration Monitor

Method that returns runtime data:

  • public String[][] getConfigurationParameters(); - returns configuration data as a two-dimensional array

Example

ObjectName name5 = new ObjectName("com.sap.default:name=\"/Applications/Bank Information/General Information/Bank information\",j2eeType=SAP_MonitorPerNode,SAP_J2EEClusterNode=\"\",SAP_J2EECluster=\"\"");
String[][] result5 = (String[][]) mbs.getAttribute(name5, "getConfigurationParameters", null, null);