com.wiley.posa3.partialacquisition
Class Scheduler

java.lang.Object
  extended bycom.wiley.posa3.partialacquisition.Scheduler
All Implemented Interfaces:
java.lang.Runnable

public class Scheduler
extends java.lang.Object
implements java.lang.Runnable

The Scheduler runs in the active object's thread of control. The requests that aret inserted into the Scheduler's message queue will fetch the network element's components when triggered by the Scheduler.

Version:
1.0
Author:
Michael Kircher, Prashant Jain

Constructor Summary
Scheduler(int numThreads, ThreadManager tm)
          Constructor.
 
Method Summary
 void insert(Request request)
          Insert a request into the message queue of the scheduler.
 void run()
          Method that is called when an instance of the Thread object is created and is passed an MQScheduler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scheduler

public Scheduler(int numThreads,
                 ThreadManager tm)
Constructor.

Parameters:
numThreads - the number of threas to spawn.
tm - an instance of a ThreadManager that is responsible for managing all the threads.
Method Detail

insert

public void insert(Request request)
Insert a request into the message queue of the scheduler.

Parameters:
request - the request to schedule.

run

public void run()
Method that is called when an instance of the Thread object is created and is passed an MQScheduler.

Specified by:
run in interface java.lang.Runnable


Copyright 2004 John Wiley and Sons. All Rights Reserved.