Skip navigation links

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09


weblogic.management.runtime
Interface TaskRuntimeMBean

All Superinterfaces:
DynamicMBean, MBeanRegistration, NotificationBroadcaster, RuntimeMBean, WebLogicMBean
All Known Subinterfaces:
ClassRedefinitionTaskRuntimeMBean, CoherenceServerLifeCycleTaskRuntimeMBean, DataRetirementTaskRuntimeMBean, DeploymentTaskRuntimeMBean, JDBCDataSourceTaskRuntimeMBean, PartitionLifeCycleTaskRuntimeMBean, ResourceGroupLifeCycleTaskRuntimeMBean, RolloutTaskRuntimeMBean, ScalingTaskRuntimeMBean, ServerLifeCycleTaskRuntimeMBean, SystemComponentLifeCycleTaskRuntimeMBean, WLDFDataRetirementTaskRuntimeMBean, WLDFDebugPatchTaskRuntimeMBean, WLDFImageCreationTaskRuntimeMBean, WorkflowTaskRuntimeMBean

public interface TaskRuntimeMBean
extends 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 instances of TaskRuntimeMBean that have been completed for some time.


Field Summary
static String PROGRESS_FAILED
          The task failed.
static String PROGRESS_PENDING
          The task has not started running yet.
static String PROGRESS_PROCESSING
          The task is currently running.
static String PROGRESS_SUCCESS
          The task successfully completed.

 

Method Summary
abstract  void cancel()
          Attempts to cancel this task.
abstract  long getBeginTime()
          The time at which this task was started.
abstract  String getDescription()
          A description of this task.
abstract  long getEndTime()
          The time at which this task was completed.
abstract  Exception getError()
          Returns an exception describing the error, if any, that occurred while performing this task.
abstract  TaskRuntimeMBean getParentTask()
          The task of which this task is a part.
abstract  String getProgress()
          The progress of this task.
abstract  String getStatus()
          The status of this task.
abstract  TaskRuntimeMBean[] getSubTasks()
          An array of TaskRuntimeMBeans that describes a set of parallel tasks which are components of this task.
abstract  boolean isRunning()
          Indicates whether the task is still running.
abstract  boolean isSystemTask()
          Indicates whether this task was initiated by the server versus a user.
abstract  void setSystemTask(boolean sys)
          Makes this a system task,

 

Methods inherited from interface weblogic.management.runtime.RuntimeMBean
addPropertyChangeListener, removePropertyChangeListener

 

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

 

Field Detail

PROGRESS_SUCCESS

static final String PROGRESS_SUCCESS
The task successfully completed.
Since:
12.2.1.0
See Also:
Constant Field Values

PROGRESS_FAILED

static final String PROGRESS_FAILED
The task failed.
Since:
12.2.1.0
See Also:
Constant Field Values

PROGRESS_PROCESSING

static final String PROGRESS_PROCESSING
The task is currently running.
Since:
12.2.1.0
See Also:
Constant Field Values

PROGRESS_PENDING

static final String PROGRESS_PENDING
The task has not started running yet.
Since:
12.2.1.0
See Also:
Constant Field Values

Method Detail

getDescription

String getDescription()

A description of this task.

Returns:
The description value

getStatus

String getStatus()

The status of this task.

Returns:
The status value

getProgress

String getProgress()

The progress of this task.

Returns:
The progress value - PROGRESS_SUCCESS, PROGRESS_FAILED, PROGRESS_PROCESSING or PROGRESS_PENDING.
Since:
12.2.1.0

isRunning

boolean isRunning()

Indicates whether the task is still running.

Returns:
The running value

getBeginTime

long getBeginTime()

The time at which this task was started.

Returns:
The beginTime value

getEndTime

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

getSubTasks

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

getParentTask

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:
TaskRuntimeMBean.getSubTasks()

cancel

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

getError

Exception getError()

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

Returns:
The error value

isSystemTask

boolean isSystemTask()

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

Returns:
The systemTask value

setSystemTask

void setSystemTask(boolean sys)

Makes this a system task,

Parameters:
sys - The new systemTask value

Skip navigation links

Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09