Package net.toddm.comm
Interface SubmittableWork
-
- All Known Subinterfaces:
Work
public interface SubmittableWorkAn interface implemented by the Comm Framework to publicly express units of work that can be submitted for processing.- Author:
- Todd S. Murchison
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CacheBehaviorgetCachingBehavior()Returns the cachingCacheBehaviorof thisSubmittableWorkinstance, or null if it had no behavior set.net.toddm.cache.CachePrioritygetCachingPriority()Returns the cachingCachePriorityof thisSubmittableWorkinstance, or null if it had no priority set.intgetId()Returns the ID of thisSubmittableWorkinstance.RequestgetRequest()Returns theRequestinstance associated with thisSubmittableWorkinstance.PrioritygetRequestPriority()Returns the requestPriorityof thisSubmittableWorkinstance.voidsetDependentWork(SubmittableWork dependentWork, DependentWorkListener dependentWorkListener)Causes thisSubmittableWorkto be dependent on the provided Work.
-
-
-
Method Detail
-
getId
int getId()
Returns the ID of thisSubmittableWorkinstance. The ID of the underlyingRequestis used. SeeRequest.getId()for details.
-
getRequest
Request getRequest()
Returns theRequestinstance associated with thisSubmittableWorkinstance.
-
getRequestPriority
Priority getRequestPriority()
Returns the requestPriorityof thisSubmittableWorkinstance.
-
getCachingPriority
net.toddm.cache.CachePriority getCachingPriority()
Returns the cachingCachePriorityof thisSubmittableWorkinstance, or null if it had no priority set.
-
getCachingBehavior
CacheBehavior getCachingBehavior()
Returns the cachingCacheBehaviorof thisSubmittableWorkinstance, or null if it had no behavior set.
-
setDependentWork
void setDependentWork(SubmittableWork dependentWork, DependentWorkListener dependentWorkListener)
Causes thisSubmittableWorkto be dependent on the provided Work. When processing this Work theCommManagerwill ensure that the given Work is processed first. This may include pausing the current Work, starting the dependent Work if it has not yet been started, etc.- Parameters:
dependentWork- An instance ofSubmittableWorkthat must finish processing before this instance is processed.dependentWorkListener- [OPTIONAL] Can be NULL. If provided, this callback is made with the results of the dependent Work before the current work is processed.
-
-