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
Class TaskRuntimeMBeanImpl

java.lang.Object
  extended byweblogic.management.runtime.RuntimeMBeanDelegate
      extended byweblogic.management.runtime.TaskRuntimeMBeanImpl
All Implemented Interfaces:
DynamicMBean, MBeanRegistration, NotificationBroadcaster, weblogic.management.runtime.RuntimeMBean, TaskRuntimeMBean, weblogic.management.WebLogicMBean
Direct Known Subclasses:
JDBCDataSourceTaskRuntimeMBeanImpl

public class TaskRuntimeMBeanImpl
extends weblogic.management.runtime.RuntimeMBeanDelegate
implements TaskRuntimeMBean

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

Field Summary
protected  long beginTime
           
protected  String description
           
protected  long endTime
           
protected  Exception error
           
protected  boolean running
           
protected  String status
           
protected  TaskRuntimeMBean[] subTasks
           
protected  boolean systemTask
           
 
Constructor Summary
TaskRuntimeMBeanImpl(String nameArg, weblogic.management.runtime.RuntimeMBean parentArg, boolean registerNow)
          Constructor for the RuntimeMBeanDelegate object
 
Method Summary
 void cancel()
          Attempts to cancel this task.
 long getBeginTime()
          Returns the time this task was started.
 String getDescription()
          A description of this task.
 long getEndTime()
          The time this task was completed.
 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.
 String getStatus()
          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 printLog(PrintWriter out)
          Prints information that was logged during the processing of the task (e.g.
protected  void setBeginTime(long beginTime)
           
protected  void setDescription(String description)
           
protected  void setEndTime(long endTime)
           
protected  void setError(Exception error)
           
protected  void setStatus(String status)
           
protected  void setSubTasks(TaskRuntimeMBean[] subTasks)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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

beginTime

protected long beginTime

description

protected String description

endTime

protected long endTime

error

protected Exception error

running

protected boolean running

status

protected String status

subTasks

protected TaskRuntimeMBean[] subTasks

systemTask

protected boolean systemTask
Constructor Detail

TaskRuntimeMBeanImpl

public TaskRuntimeMBeanImpl(String nameArg,
                            weblogic.management.runtime.RuntimeMBean parentArg,
                            boolean registerNow)
                     throws weblogic.management.ManagementException
Constructor for the RuntimeMBeanDelegate object

Throws:
weblogic.management.ManagementException
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 - do we also need isCancellable()?

Specified by:
cancel in interface TaskRuntimeMBean
Throws:
Exception

getBeginTime

public long getBeginTime()

Returns the time this task was started.

Specified by:
getBeginTime in interface TaskRuntimeMBean
Returns:
The beginTime value

getDescription

public String getDescription()

A description of this task.

Returns a description of this task

Specified by:
getDescription in interface TaskRuntimeMBean
Returns:
The description value

getEndTime

public long getEndTime()

The time this task was completed.

Returns the time this task was completed. Returns -1 if the task is currently running.

Specified by:
getEndTime in interface TaskRuntimeMBean
Returns:
The endTime value

getError

public Exception getError()

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

Specified by:
getError in interface TaskRuntimeMBean
Returns:
The error value

getParentTask

public TaskRuntimeMBean getParentTask()

Returns the task of which this task is a part (see getSubTasks), or null if there is none.

Specified by:
getParentTask in interface TaskRuntimeMBean
Returns:
The parentTask value
See Also:
TaskRuntimeMBean.getSubTasks()

getStatus

public String getStatus()

The status of this task.

Returns the status of this Task.

Specified by:
getStatus in interface TaskRuntimeMBean
Returns:
The status value

getSubTasks

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.

Specified by:
getSubTasks in interface TaskRuntimeMBean
Returns:
The subTasks value

isRunning

public boolean isRunning()

Returns true if the Task is still running.

Specified by:
isRunning in interface TaskRuntimeMBean
Returns:
The running value

isSystemTask

public boolean isSystemTask()

Indicates this task was initiated by the server.

Specified by:
isSystemTask in interface TaskRuntimeMBean
Returns:
The systemTask value

printLog

public void printLog(PrintWriter out)

Prints information that was logged during the processing of the task (e.g. server startup log) to the given Writer.

Specified by:
printLog in interface TaskRuntimeMBean
Parameters:
out -
Excluded: Should not appear in public javadocs

setBeginTime

protected void setBeginTime(long beginTime)

setDescription

protected void setDescription(String description)

setEndTime

protected void setEndTime(long endTime)

setError

protected void setError(Exception error)

setStatus

protected void setStatus(String status)

setSubTasks

protected void setSubTasks(TaskRuntimeMBean[] subTasks)

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