org.alfresco.service.cmr.action
Interface ActionTrackingService

All Known Implementing Classes:
ActionTrackingServiceImpl

public interface ActionTrackingService

Service interface for tracking when actions begin to run, complete or fail.


Method Summary
 java.util.List getAllExecutingActions()
          Retrieve summary details of all the actions currently executing.
 java.util.List getExecutingActions(Action action)
          Retrieve summary details of all instances of the specified action that are currently executing.
 java.util.List getExecutingActions(java.lang.String type)
          Retrieve summary details of all the actions of the given type that are currently executing.
 ExecutionDetails getExecutionDetails(ExecutionSummary executionSummary)
          Retrieves the execution details on the given executing action, such as when it started, and what machine it is executing on.
 boolean isCancellationRequested(CancellableAction action)
          Has cancellation been requested for the given action? This method is most commonly called by the action in question, to check to see if someone has called ActionTrackingService.requestActionCancellation(CancellableAction) for them.
 void recordActionComplete(Action action)
          Record that an action has completed execution without error.
 void recordActionExecuting(Action action)
          Record that an action has begun execution.
 void recordActionFailure(Action action, java.lang.Throwable problem)
          Record that an action failed during execution
 void recordActionPending(Action action)
          Record that an action has been scheduled for asynchronous execution, and is pending being executed.
 void requestActionCancellation(CancellableAction action)
          Requests that the specified Action cancel itself and aborts execution, as soon as possible.
 void requestActionCancellation(ExecutionSummary executionSummary)
          Requests that the specified Action cancel itself and aborts execution, as soon as possible.
 

Method Detail

recordActionPending

void recordActionPending(Action action)
Record that an action has been scheduled for asynchronous execution, and is pending being executed.

Parameters:
action - the action that has been scheduled

recordActionExecuting

void recordActionExecuting(Action action)
Record that an action has begun execution.

Parameters:
action - the action that has begun execution

recordActionComplete

void recordActionComplete(Action action)
Record that an action has completed execution without error.

Parameters:
action - the action that has been finished

recordActionFailure

void recordActionFailure(Action action,
                         java.lang.Throwable problem)
Record that an action failed during execution

Parameters:
action - the action that has failed

requestActionCancellation

void requestActionCancellation(CancellableAction action)
Requests that the specified Action cancel itself and aborts execution, as soon as possible. Cancellable actions periodically check to see if a cancel has been requested, and will take note of the cancel request once seen.

Parameters:
action - The action to request the cancel of

requestActionCancellation

void requestActionCancellation(ExecutionSummary executionSummary)
Requests that the specified Action cancel itself and aborts execution, as soon as possible. Cancellable actions periodically check to see if a cancel has been requested, and will take note of the cancel request once seen. If the specified action is not a cancellable action, nothing will happen.

Parameters:
action - The action to request the cancel of

isCancellationRequested

boolean isCancellationRequested(CancellableAction action)
Has cancellation been requested for the given action? This method is most commonly called by the action in question, to check to see if someone has called ActionTrackingService.requestActionCancellation(CancellableAction) for them.

Parameters:
action - The action to check about
Returns:
if cancellation has been requested or not

getExecutionDetails

ExecutionDetails getExecutionDetails(ExecutionSummary executionSummary)
Retrieves the execution details on the given executing action, such as when it started, and what machine it is executing on.


getAllExecutingActions

java.util.List getAllExecutingActions()
Retrieve summary details of all the actions currently executing.


getExecutingActions

java.util.List getExecutingActions(java.lang.String type)
Retrieve summary details of all the actions of the given type that are currently executing.


getExecutingActions

java.util.List getExecutingActions(Action action)
Retrieve summary details of all instances of the specified action that are currently executing.



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.