|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Exposes monitoring information about an ongoing and potentially long-running administrative process. This should be taken to mean, at minimum, any OAM operation involving IO. 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. OA&M clients 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 an OA&M client, or removed by a scavenger process which periodically purges TaskRuntimeMBeans that have been completed for some time.
Method Summary | |
void |
cancel()
Attempts to cancel this task. |
long |
getBeginTime()
Returns the time this task was started. |
java.lang.String |
getDescription()
Returns a description of this task |
long |
getEndTime()
Returns the time this task was completed. |
java.lang.Exception |
getError()
Returns an exception describing the error, if any, that occurred while performing this Task. |
TaskRuntimeMBean |
getParentTask()
Returns the task of which this task is a part (see getSubTasks), or null if there is none. |
java.lang.String |
getStatus()
Returns the status of this Task. |
TaskRuntimeMBean[] |
getSubTasks()
Returns an array of TaskRuntimes describing a set of parallel tasks which are components of this task. |
boolean |
isRunning()
Returns true if the Task is still running. |
boolean |
isSystemTask()
Indicates this task was initiated by the server. |
void |
setSystemTask(boolean sys)
Make this a system task |
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,
preRegister |
Methods inherited from interface javax.management.NotificationBroadcaster |
addNotificationListener,
getNotificationInfo,
removeNotificationListener |
Method Detail |
public java.lang.String getDescription()
Returns a description of this task
public java.lang.String getStatus()
Returns the status of this Task.
public boolean isRunning()
Returns true if the Task is still running.
public long getBeginTime()
Returns the time this task was started.
public long getEndTime()
Returns the time this task was completed. Returns -1 if the task is currently running.
public TaskRuntimeMBean[] getSubTasks()
Returns an array of TaskRuntimes describing a set of parallel tasks which are components of this task. Returns null if 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.
public TaskRuntimeMBean getParentTask()
Returns the task of which this task is a part (see getSubTasks), or null if there is none.
public void cancel() throws java.lang.Exception
Attempts to cancel this task. An Exception is thrown to indicate failure to cancel the task. Not all tasks can be cancelled - do we also need isCancellable()?
public java.lang.Exception getError()
Returns an exception describing the error, if any, that occurred while performing this Task.
public boolean isSystemTask()
public void setSystemTask(boolean sys)
sys
- The new systemTask value
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |