Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.management.oss.impl.job.opstatus
Class J2EEMonitoredObjectElement

    java.lang.Object
      com.sun.management.oss.impl.job.opstatus.MonitoredObjectElement
          com.sun.management.oss.impl.job.opstatus.J2EEMonitoredObjectElement

public class J2EEMonitoredObjectElement
extends MonitoredObjectElement

`J2EEMonitoredObjectElement` holds the StateManageable state, as described in the JSR 77, of a monitored object identified by an object name.

Constructor Summary
`J2EEMonitoredObjectElement(javax.management.ObjectName objectName)` Creates a new instance of `J2EEMonitoredObjectElement` with the given object name.

Method Summary
`void` | `setException(java.lang.String msg)` Sets the exception field of this object.
`boolean` | `setStateManageable(int state, long startTime)` Sets the new state of this state, the time in milliseconds when the monitored entity entered the RUNNING(1) state.
`java.lang.String` | `toXml()` Returns a XML representation of this `J2EEMonitoredObjectElement` instance.

Methods inherited from class com.sun.management.oss.impl.job.opstatus.MonitoredObjectElement
`getException, hasException`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### J2EEMonitoredObjectElement

    public J2EEMonitoredObjectElement(javax.management.ObjectName objectName)

  Creates a new instance of `J2EEMonitoredObjectElement` with the given object name.

Parameters:
  `objectName` - the object name that identified the monitored object represented by this object.

Method Detail

### setException

    public void setException(java.lang.String msg)

  Sets the exception field of this object.

  An exception is set if an issue occured while retrieving information from the instrumentation layer.

  Overrides:
    `setException` in class `MonitoredObjectElement`
  Parameters:
    `msg` - the exception message.

### setStateManageable

    public boolean setStateManageable(int state,
                                      long startTime)

  Sets the new state of this state, the time in milliseconds when the monitored entity entered the RUNNING(1) state.

  States are :

  - 0 : STARTING
  - 1 : RUNNING
  - 2 : STOPPING
  - 3 : STOPPED
  - 4 : FAILED

  The returned value indicates if the state has changed since last call (on the first call, this method returns false).

  Parameters:
    `state` - the new state.
    `startTime` - time in milliseconds when the state entered the RUNNING(1) state.
  Returns:
    true if the availability status changed since last call; false otherwise.

### toXml

    public java.lang.String toXml()

  Returns a XML representation of this `J2EEMonitoredObjectElement` instance.

  Specified by:
    `toXml` in class `MonitoredObjectElement`
  Returns:
    a XML representation of this `J2EEMonitoredObjectElement` instance.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD