javax.realtime
Class PriorityParameters

java.lang.Object
  extended byjavax.realtime.SchedulingParameters
      extended byjavax.realtime.PriorityParameters
All Implemented Interfaces:
Cloneable
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 the class PriorityScheduler is such a scheduler.

Author:
Angelo Corsaro, Morgan Deters

Field Summary
protected  int priority
           
 
Constructor Summary
PriorityParameters(int priority)
          Create an instance of PriorityParameters with the given priority.
 
Method Summary
 int getPriority()
          Gets the priority.
 void setPriority(int priority)
          Sets the priority.
 String toString()
          Get a String representation of this PriorityParameters.
 
Methods inherited from class javax.realtime.SchedulingParameters
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

priority

protected int priority
Constructor Detail

PriorityParameters

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

Parameters:
priority - The priority assigned to a thread. This value is used in place of the value returned by Thread.setPriority(int)
Method Detail

getPriority

public int getPriority()
Gets the priority.

Returns:
the priority value.

setPriority

public void setPriority(int priority)
Sets the priority.

Parameters:
priority - the new priority.
Throws:
IllegalArgumentException - if the given priority is incompatible with the Scheduler for any of the Schedulable objects currently sharing this SchedulingParameters object

toString

public String toString()
Get a String representation of this PriorityParameters.

Returns:
a String representation of this PriorityParameters


jRate is developed and maintained by the jRate project development team.
Copyright (c) 2001-2006 Angelo Corsaro and Morgan Deters.