BEA Systems, Inc.

Type-Safe Access to BEA WebLogic Server 9.0 MBeans (Deprecated)

(Methods marked with @since 9.0.0.0 are not available through the deprecated MBeanHome interface.)


weblogic.management.runtime
Interface TaskRuntimeMBean

All Superinterfaces:
DynamicMBean, MBeanRegistration, NotificationBroadcaster, weblogic.management.runtime.RuntimeMBean, weblogic.management.WebLogicMBean
All Known Subinterfaces:
DeploymentTaskRuntimeMBean, JDBCDataSourceTaskRuntimeMBean, ServerLifeCycleTaskRuntimeMBean

public interface TaskRuntimeMBean
extends weblogic.management.runtime.RuntimeMBean

Exposes monitoring information about an ongoing and potentially long-running administrative process. This should be taken to mean, at minimum, any OA&M operation involving I/O. Examples include starting and stopping servers, deploying and undeploying applications, or migrating services.

An MBean operation of this sort should fork a separate thread to perform the actual work and immediately return an instance of TaskRuntimeMBean to the caller. The caller can then use this to track the task's progress as desired. Users can also query for all instances of TaskRuntimeMBean to get a summary of both currently-running and recently-completed tasks.

Instance of TaskRuntimeMBean continue to exist in the MBeanServer after the completion of the work they describe. They will eventually either be explicitly deregistered by the user, or removed by a scavenger process which periodically purges TaskRuntimeMBeans that have been completed for some time.

Deprecation of MBeanHome and Type-Safe Interfaces

This is a type-safe interface for a WebLogic Server MBean, which you can import into your client classes and access through weblogic.management.MBeanHome. As of 9.0, the MBeanHome interface and all type-safe interfaces for WebLogic Server MBeans are deprecated. Instead, client classes that interact with WebLogic Server MBeans should use standard JMX design patterns in which clients use the javax.management.MBeanServerConnection interface to discover MBeans, attributes, and attribute types at runtime. For more information, see "Developing Manageable Applications with JMX" on http://www.oracle.com/technology/documentation/index.html.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Method Summary
 void cancel()
          Attempts to cancel this task.
 long getBeginTime()
          The time at which this task was started.
 String getDescription()
          A description of this task.
 long getEndTime()
          The time at which this task was completed.
 Exception getError()
          Returns an exception describing the error, if any, that occurred while performing this task.
 TaskRuntimeMBean getParentTask()
          The task of which this task is a part.
 String getStatus()
          The status of this task.
 TaskRuntimeMBean[] getSubTasks()
          An array of TaskRuntimeMBeans that describes a set of parallel tasks which are components of this task.
 boolean isRunning()
          Indicates whether the task is still running.
 boolean isSystemTask()
          Indicates whether this task was initiated by the server versus a user.
 
Methods inherited from interface weblogic.management.WebLogicMBean
getMBeanInfo, getName, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setName, setParent
 
Methods inherited from interface javax.management.DynamicMBean
getAttribute, getAttributes, invoke, setAttribute, setAttributes
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Method Detail

cancel

public void cancel()
            throws Exception

Attempts to cancel this task.

An exception is thrown to indicate failure to cancel the task. Not all tasks can be cancelled.

Throws:
Exception

getBeginTime

public long getBeginTime()

The time at which this task was started.

Returns:
The beginTime value

getDescription

public String getDescription()

A description of this task.

Returns:
The description value

getEndTime

public long getEndTime()

The time at which this task was completed.

A value of -1 indicates that the task is currently running.

Returns:
The endTime value

getError

public Exception getError()

Returns an exception describing the error, if any, that occurred while performing this task.

Returns:
The error value

getParentTask

public TaskRuntimeMBean getParentTask()

The task of which this task is a part.

A value of null indicates that this task is not a subtask.

Returns:
The parentTask value
See Also:
getSubTasks()

getStatus

public String getStatus()

The status of this task.

Returns:
The status value

getSubTasks

public TaskRuntimeMBean[] getSubTasks()

An array of TaskRuntimeMBeans that describes a set of parallel tasks which are components of this task.

A value of null indicates that this task has no subtasks.

A simple example of a task with subtasks would be one which monitors a user's request to start a cluster; that task should return a set of subtasks indicating the individual server-startup processes which compose the overall cluster-startup task.

Returns:
The subTasks value

isRunning

public boolean isRunning()

Indicates whether the task is still running.

Returns:
The running value

isSystemTask

public boolean isSystemTask()

Indicates whether this task was initiated by the server versus a user.

Returns:
The systemTask value

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs90
Copyright 2005 BEA Systems Inc.