org.jppf.management
Class JPPFNodeTaskMonitor

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.jppf.management.JPPFNodeTaskMonitor
All Implemented Interfaces:
EventListener, NotificationBroadcaster, NotificationEmitter, JPPFNodeTaskMonitorMBean, TaskExecutionListener

public class JPPFNodeTaskMonitor
extends NotificationBroadcasterSupport
implements JPPFNodeTaskMonitorMBean, TaskExecutionListener

MBean implementation for task-level monitoring on each node.

Author:
Laurent Cohen

Field Summary
 
Fields inherited from interface org.jppf.management.JPPFNodeTaskMonitorMBean
TASK_MONITOR_MBEAN_NAME
 
Constructor Summary
JPPFNodeTaskMonitor(String objectName)
          Default constructor.
 
Method Summary
 Long getTotalTaskCpuTime()
          The total cpu time used by the tasks in milliseconds.
 Long getTotalTaskElapsedTime()
          The total elapsed time used by the tasks in milliseconds.
 Integer getTotalTasksExecuted()
          Get the total number of tasks executed by the node.
 Integer getTotalTasksInError()
          The total number of tasks that ended in error.
 Integer getTotalTasksSucessfull()
          The total number of tasks that executed sucessfully.
 void taskExecuted(TaskExecutionEvent event)
          Called to notify a listener that a task was executed.
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Constructor Detail

JPPFNodeTaskMonitor

public JPPFNodeTaskMonitor(String objectName)
Default constructor.

Parameters:
objectName - a string representing the MBean object name.
Method Detail

taskExecuted

public void taskExecuted(TaskExecutionEvent event)
Called to notify a listener that a task was executed.

Specified by:
taskExecuted in interface TaskExecutionListener
Parameters:
event - the event encapsulating the task-related data.
See Also:
TaskExecutionListener.taskExecuted(org.jppf.server.node.TaskExecutionEvent)

getTotalTasksExecuted

public Integer getTotalTasksExecuted()
Get the total number of tasks executed by the node.

Specified by:
getTotalTasksExecuted in interface JPPFNodeTaskMonitorMBean
Returns:
the number of tasks as an integer value.
See Also:
JPPFNodeTaskMonitorMBean.getTotalTasksExecuted()

getTotalTaskCpuTime

public Long getTotalTaskCpuTime()
The total cpu time used by the tasks in milliseconds.

Specified by:
getTotalTaskCpuTime in interface JPPFNodeTaskMonitorMBean
Returns:
the cpu time as long value.
See Also:
JPPFNodeTaskMonitorMBean.getTotalTaskCpuTime()

getTotalTaskElapsedTime

public Long getTotalTaskElapsedTime()
The total elapsed time used by the tasks in milliseconds.

Specified by:
getTotalTaskElapsedTime in interface JPPFNodeTaskMonitorMBean
Returns:
the elapsed time as long value.
See Also:
JPPFNodeTaskMonitorMBean.getTotalTaskElapsedTime()

getTotalTasksInError

public Integer getTotalTasksInError()
The total number of tasks that ended in error.

Specified by:
getTotalTasksInError in interface JPPFNodeTaskMonitorMBean
Returns:
the number as an integer value.
See Also:
JPPFNodeTaskMonitorMBean.getTotalTasksInError()

getTotalTasksSucessfull

public Integer getTotalTasksSucessfull()
The total number of tasks that executed sucessfully.

Specified by:
getTotalTasksSucessfull in interface JPPFNodeTaskMonitorMBean
Returns:
the number as an integer value.
See Also:
JPPFNodeTaskMonitorMBean.getTotalTasksSucessfull()


Copyright © 2005-2010 JPPF Team.