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

## com.sun.appserv.management.j2ee
Interface StateManageable

All Known Subinterfaces:
  AppClientModule, EJBModule, J2EEApplication, J2EECluster, J2EEDeployedObject, J2EELogicalServer, J2EEModule, J2EEServer, ResourceAdapterModule, WebModule

public interface StateManageable

Field Summary
`static int` | `STATE_FAILED` This state indicates that the StateManageable Object is in a failed state and intervention is required to restore the managed object.
`static int` | `STATE_RUNNING` This is the normal running state for an SMO.
`static int` | `STATE_STARTING` This state indicates that the SMO has been requested to start, and is in the process of starting.
`static int` | `STATE_STOPPED` This state indicates that the StateManageable Object has stopped and can be restarted.
`static int` | `STATE_STOPPING` This state indicates that the SMO has been requested to stop, and is in the process of stopping.

Method Summary
`long` | `getstartTime()` The time that the managed object was started represented as a long which value is the number of milliseconds since January 1, 1970, 00:00:00.
`int` | `getstate()` The current state of this SMO.
`void` | `start()` Starts the SMO.
`void` | `startRecursive()` Starts the SMO.
`void` | `stop()` Stops the SMO.

Field Detail

### STATE_STARTING

    public static final int STATE_STARTING

  This state indicates that the SMO has been requested to start, and is in the process of starting. On entering this state an SMO may generate an event whose type value is "STATE". Event notification of the STARTING state is optional for all managed objects that implement StateManageable.

  See Also:
    Constant Field Values

### STATE_RUNNING

    public static final int STATE_RUNNING

  This is the normal running state for an SMO. This state indicates that the SMO is operational. On entering this state an SMO must generate an event whose type value is "STATE". Event notification of the RUNNING state is required for all managed objects that implement StateManageable.

  See Also:
    Constant Field Values

### STATE_STOPPING

    public static final int STATE_STOPPING

  This state indicates that the SMO has been requested to stop, and is in the process of stopping. On entering this state an SMO may generate an event whose type value is "STATE". Event notification of the STOPPING state is optional for all managed objects that implement StateManageable.

  See Also:
    Constant Field Values

### STATE_STOPPED

    public static final int STATE_STOPPED

  This state indicates that the StateManageable Object has stopped and can be restarted. On entering this state an SMO must generate an event whose type value is "STATE". Event notification of the STOPPED state is required by all managed objects that implement StateManageable.

  See Also:
    Constant Field Values

### STATE_FAILED

    public static final int STATE_FAILED

  This state indicates that the StateManageable Object is in a failed state and intervention is required to restore the managed object. On entering this state an SMO must generate an event whose type value is "STATE". Event notification of the FAILED state is required by all managed objects that implement StateManageable.

  See Also:
    Constant Field Values

Method Detail

### getstate

    public int getstate()

  The current state of this SMO. The SMO can be in one of the following states:
  - #STATE_STARTING
  - #STATE_RUNNING
  - #STATE_STOPPING
  - #STATE_STOPPED
  - #STATE_FAILED

  Note that the Attribute name is case-sensitive "state" as defined by JSR 77.

### getstartTime

    public long getstartTime()

  The time that the managed object was started represented as a long which value is the number of milliseconds since January 1, 1970, 00:00:00.

  Note that the Attribute name is case-sensitive "startTime" as defined by JSR 77.

### start

    public void start()

  Starts the SMO. This operation can be invoked only when the SMO is in the STOPPED state. It causes the SMO to go into the STARTING state initially, and if it completes successfully, the SMO will be in the RUNNING state. Note that start() is not called on any of the child SMOs that are registered with this SMO; it is the responsibility of the calling application to start the child SMO if this is required.

### startRecursive

    public void startRecursive()

  Starts the SMO. This operation can only be invoked when the SMO is in the STOPPED state. It causes the SMO to go into the STARTING state initially, and if it completes successfully, the SMO will be in the RUNNING state. startRecursive() is called on all the child SMOs registered with this SMO that are in the STOPPED state. Stops the SMO. This operation can only be invoked when the SMO is in the RUNNING or STARTING state. It causes stop() to be called on all the child SMOs registered with this SMO that are in the RUNNING or STARTING state. It causes the SMO to go into the STOPPING state initially, and if it completes successfully, the SMO and all the child SMOs will be in the STOPPED state. There is no stopRecursive() operation because it is mandatory if an SMO is in the STOPPED state, that all its child SMOs must also be in the STOPPED state.

### stop

    public void stop()

  Stops the SMO. This operation can only be invoked when the SMO is in the RUNNING or STARTING state. It causes stop() to be called on all the child SMOs registered with this SMO that are in the RUNNING or STARTING state. It causes the SMO to go into the STOPPING state initially, and if it completes successfully, the SMO and all the child SMOs will be in the STOPPED state. There is no stopRecursive() operation because it is mandatory if an SMO is in the STOPPED state, that all its child SMOs must also be in the STOPPED state.

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

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.