FileDocCategorySizeDatePackage
WorkerMBean.javaAPI DocExample1092Thu May 23 09:32:50 BST 2002sample.notification

WorkerMBean.java

package sample.notification;

import sample.standard.BasicMBean;

/**
 * Management interface definition for Worker as
 * a standard MBean. A worker represents a thread of
 * execution in the application that is performing some
 * work.
 *
 * There are four attributes:
 *
 * 1. WorkFactor (int) - Read/Write
 * 2. NumberOfUnitsProcessed (long) - READ-ONLY
 * 3. AverageUnitProcessingTime (float) - READ-ONLY
 * 4. Suspended (boolean) - READ-ONLY
 *
 * and three operations:
 *
 * 1. stop() - shuts down the worker thread
 * 2. suspend() - suspends processing (i.e., the "work")
 *    of the worker thread.
 * 3. resume() - resumes processing of the worker thread.
 */
public interface WorkerMBean extends BasicMBean
{
    // Attributes
    public int getWorkFactor ();
    public void setWorkFactor (int workFactor);
    public long getNumberOfUnitsProcessed ();
    public float getAverageUnitProcessingTime ();
    public boolean isSuspended ();
    // Operations
    public void stop ();
    public void suspend ();
    public void resume ();
}