javax.realtime
Class PriorityParameters

java.lang.Object
  extended byjavax.realtime.SchedulingParameters
      extended byjavax.realtime.PriorityParameters
Direct Known Subclasses:
ImportanceParameters

public class PriorityParameters
extends SchedulingParameters

Instances of this class should be assigned to threads that are managed by schedulers which use a single integer to determine execution order. The base scheduler required by this specification and represented by PriorityScheduler is such a scheduler.


Field Summary
protected  int priority
          The (base) priority of this object
 
Constructor Summary
PriorityParameters(int priority)
          Create an instance of PriorityParameters with the given priority.
 
Method Summary
 int getPriority()
          Gets the priority value.
 void setPriority(int priority)
          Set the priority value.
 java.lang.String toString()
          Converts the priority value to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

priority

protected int priority
The (base) priority of this object

Constructor Detail

PriorityParameters

public PriorityParameters(int priority)
Create an instance of PriorityParameters with the given priority.

Parameters:
priority - The priority assigned to schedulable objects that use this parameter instance.
Method Detail

getPriority

public int getPriority()
Gets the priority value.

Returns:
The priority.

setPriority

public void setPriority(int priority)
                 throws java.lang.IllegalArgumentException
Set the priority value. If this parameter object is associated with any schedulable object (by being passed through the schedulable object's constructor or set with a method such as RealtimeThread.setSchedulingParameters(SchedulingParameters)) the base priority of those schedulable objects is altered as specified by each schedulable object's scheduler.

Parameters:
priority - The value to which priority is set.
Throws:
java.lang.IllegalArgumentException - Thrown if the given priority value is incompatible with the scheduler for any of the schedulable objects which are presently using this parameter object.

toString

public java.lang.String toString()
Converts the priority value to a string.

Returns:
A string representing the value of priority.