net.sf.mybatchfwk.jmx
Interface ManagedBatchServiceMBean

All Known Implementing Classes:
ManagedBatchService

public interface ManagedBatchServiceMBean

The MBean interface of the batch service.
Provide the operations pause, resume, restart and shutdown.
Provide attributes that give informations about the batch execution: number of completed and failed tasks, current state, begin date and end date of the execution.

Author:
Jérôme Bertèche (cyberteche@users.sourceforge.net)

Method Summary
 java.util.Date getBeginDate()
          Return the begin date of the execution
 java.util.Date getEndDate()
          Return the end date of the execution
 long getNumberOfCompletedTasks()
          Return the number of completed tasks
 long getNumberOfFailedTasks()
          Return the number of failed tasks
 java.lang.String getState()
          Return the current batch state
 void pause()
          Pause operation.
 void restart()
          Restart operation.
 void resume()
          Resume operation.
 void shutdown()
          Shutdown operation.
 void shutdownNow()
          Shutdown now operation.
 

Method Detail

pause

void pause()
           throws java.lang.Exception
Pause operation.
Suspends the execution of the batch/executor/schedule services.
Required batch state: running

Throws:
java.lang.Exception - if the state of the batch cannot permit this operation.

resume

void resume()
            throws java.lang.Exception
Resume operation.
Resume the execution of the batch/executor/schedule services.
Required batch state: sleeping, waiting for launch, waiting for shutdown

Throws:
java.lang.Exception - if the state of the batch cannot permit this operation.

shutdown

void shutdown()
              throws java.lang.Exception
Shutdown operation.
Stop the execution of the batch. Wait for the execution of the submitted tasks before to terminate.
Required batch state: all

Throws:
java.lang.Exception - if the state of the batch cannot permit this operation.

shutdownNow

void shutdownNow()
                 throws java.lang.Exception
Shutdown now operation.
Stop the execution of the batch immediately.
Warning: the running tasks will be stopped abruptly.
Required batch state: all

Throws:
java.lang.Exception - if the state of the batch cannot permit this operation.

restart

void restart()
             throws java.lang.Exception
Restart operation.
Restart the execution of the batch.
Required batch state: waiting for shutdown

Throws:
java.lang.Exception - if the state of the batch cannot permit this operation.

getNumberOfCompletedTasks

long getNumberOfCompletedTasks()
Return the number of completed tasks

Returns:

getNumberOfFailedTasks

long getNumberOfFailedTasks()
Return the number of failed tasks

Returns:

getState

java.lang.String getState()
Return the current batch state

Returns:

getBeginDate

java.util.Date getBeginDate()
Return the begin date of the execution

Returns:

getEndDate

java.util.Date getEndDate()
Return the end date of the execution

Returns:


Copyright © 2006 null. All Rights Reserved.