com.googlecode.lightest.core
Interface IInterruptibleTaskDispatchStrategy

All Superinterfaces:
ITaskDispatchStrategy
All Known Implementing Classes:
InteractiveTaskDispatchStrategy

public interface IInterruptibleTaskDispatchStrategy
extends ITaskDispatchStrategy

A dispatch strategy that can be interrupted. This may be to hand control over to an interactive user, or for other reasons. Even though this strategy generally supports being interrupted, there may be situations where interruption is unallowed, as indicated by the interruptible property.


Method Summary
 void interrupt()
          Notifies the dispatch strategy of the intent to interrupt.
 boolean isInterruptible()
          Returns whether interrupt() is allowed to be called on this strategy.
 void setInterruptible(boolean interruptible)
          Sets whether interrupt() is allowed to be called on this strategy.
 
Methods inherited from interface com.googlecode.lightest.core.ITaskDispatchStrategy
dispatch
 

Method Detail

setInterruptible

void setInterruptible(boolean interruptible)
Sets whether interrupt() is allowed to be called on this strategy.

Parameters:
interruptible -

isInterruptible

boolean isInterruptible()
Returns whether interrupt() is allowed to be called on this strategy.


interrupt

void interrupt()
Notifies the dispatch strategy of the intent to interrupt. This method should check the interruptible flag to see if interruption is allowed.



Copyright © 2009. All Rights Reserved.