javax.realtime
Interface Schedulable

All Superinterfaces:
java.lang.Runnable
All Known Implementing Classes:
AsyncEventHandler, RealtimeThread

public interface Schedulable
extends java.lang.Runnable

Handlers and other objects can be run by a Scheduler if they provide a run() method and the methods defined below. The Scheduler uses this information to create a suitable context to execute the run() method.


Method Summary
 boolean addToFeasibility()
          Inform the scheduler and cooperating facilities that the resource demands (as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters) of this instance of Schedulable will be considered in the feasibility analysis of the associated Scheduler until further notice.
 MemoryParameters getMemoryParameters()
          Return the MemoryParameters of this schedulable object.
 ProcessingGroupParameters getProcessingGroupParameters()
          Return the ProcessingGroupParameters of this schedulable object.
 ReleaseParameters getReleaseParameters()
          Return the ReleaseParameters of this schedulable object.
 Scheduler getScheduler()
          Return the Scheduler for this schedulable object.
 SchedulingParameters getSchedulingParameters()
          Return the SchedulingParameters of this schedulable object.
 boolean removeFromFeasibility()
          Inform the scheduler and cooperating facilities that the resource demands, as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters, of this instance of Schedulable should no longer be considered in the feasibility analysis of the associated Scheduler.
 void setMemoryParameters(MemoryParameters memory)
          Set the MemoryParameters of this schedulable object.
 boolean setMemoryParametersIfFeasible(MemoryParameters memParam)
          Set the MemoryParameters of this schedulable object.
 void setProcessingGroupParameters(ProcessingGroupParameters groupParameters)
          Set the ProcessingGroupParameters of this schedulable object.
 boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters groupParameters)
          Set the ProcessingGroupParameters of this schedulable object only if the resulting task set is feasible.
 void setReleaseParameters(ReleaseParameters release)
          Set the ReleaseParameters for this schedulable object.
 boolean setReleaseParametersIfFeasible(ReleaseParameters release)
          Set the ReleaseParameters for this schedulable object only if the resulting task set is feasible.
 void setScheduler(Scheduler scheduler)
          Set the Scheduler for this schedulable object.
 void setScheduler(Scheduler scheduler, SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memoryParameters, ProcessingGroupParameters processingGroup)
          Set the Scheduler for this schedulable object.
 void setSchedulingParameters(SchedulingParameters scheduling)
          Set the SchedulingParameters of this scheduable object.
 boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
          Set the SchedulingParameters of this schedulable object only if the resulting task set is feasible.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

addToFeasibility

public boolean addToFeasibility()
Inform the scheduler and cooperating facilities that the resource demands (as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters) of this instance of Schedulable will be considered in the feasibility analysis of the associated Scheduler until further notice. Whether the resulting system is feasible or not, the addition is completed.
Returns:
true If the resulting system is feasible.

getMemoryParameters

public MemoryParameters getMemoryParameters()
Return the MemoryParameters of this schedulable object.

getReleaseParameters

public ReleaseParameters getReleaseParameters()
Return the ReleaseParameters of this schedulable object.

getScheduler

public Scheduler getScheduler()
Return the Scheduler for this schedulable object.

getSchedulingParameters

public SchedulingParameters getSchedulingParameters()
Return the SchedulingParameters of this schedulable object.

getProcessingGroupParameters

public ProcessingGroupParameters getProcessingGroupParameters()
Return the ProcessingGroupParameters of this schedulable object.

removeFromFeasibility

public boolean removeFromFeasibility()
Inform the scheduler and cooperating facilities that the resource demands, as expressed in the associated instances of SchedulingParameters, ReleaseParameters, MemoryParameters, and ProcessingGroupParameters, of this instance of Schedulable should no longer be considered in the feasibility analysis of the associated Scheduler. Whether the resulting system is feasible or not, the subtraction is completed.
Returns:
true If the resulting system is feasible.

setMemoryParameters

public void setMemoryParameters(MemoryParameters memory)
Set the MemoryParameters of this schedulable object.
Parameters:
memory - The MemoryParameters object.

setReleaseParameters

public void setReleaseParameters(ReleaseParameters release)
Set the ReleaseParameters for this schedulable object.
Parameters:
release - The ReleaseParameters object.

setScheduler

public void setScheduler(Scheduler scheduler)
                  throws java.lang.IllegalThreadStateException
Set the Scheduler for this schedulable object.
Parameters:
scheduler - The Scheduler object.

setScheduler

public void setScheduler(Scheduler scheduler,
                         SchedulingParameters scheduling,
                         ReleaseParameters release,
                         MemoryParameters memoryParameters,
                         ProcessingGroupParameters processingGroup)
                  throws java.lang.IllegalThreadStateException
Set the Scheduler for this schedulable object.
Parameters:
scheduler - The Scheduler object.

setSchedulingParameters

public void setSchedulingParameters(SchedulingParameters scheduling)
Set the SchedulingParameters of this scheduable object.
Parameters:
scheduling - The SchedulingParameters object.

setProcessingGroupParameters

public void setProcessingGroupParameters(ProcessingGroupParameters groupParameters)
Set the ProcessingGroupParameters of this schedulable object.
Parameters:
groupParameters - The ProcessingGroupParameters object.

setProcessingGroupParametersIfFeasible

public boolean setProcessingGroupParametersIfFeasible(ProcessingGroupParameters groupParameters)
Set the ProcessingGroupParameters of this schedulable object only if the resulting task set is feasible.
Parameters:
groupParameters - The ProcessingGroupParameters object.

setSchedulingParametersIfFeasible

public boolean setSchedulingParametersIfFeasible(SchedulingParameters scheduling)
Set the SchedulingParameters of this schedulable object only if the resulting task set is feasible.
Parameters:
scheduling - The SchedulingParameters object. If null nothing happens.

setReleaseParametersIfFeasible

public boolean setReleaseParametersIfFeasible(ReleaseParameters release)
Set the ReleaseParameters for this schedulable object only if the resulting task set is feasible.
Parameters:
release - The ReleaseParameters object. If null nothing happens.

setMemoryParametersIfFeasible

public boolean setMemoryParametersIfFeasible(MemoryParameters memParam)
Set the MemoryParameters of this schedulable object.
Parameters:
memory - The MemoryParameters object. If null nothing happens.