Prism.core
Class Scaffold

java.lang.Object
  extended by Prism.core.Scaffold
All Implemented Interfaces:
AbstractScaffold

public class Scaffold
extends java.lang.Object
implements AbstractScaffold

A scaffold provides a structure that allows for bricks to associate themselves with it. This structure provides a set of common utilites that are leveraged by all the bricks attached to it: 1)Scheduler: Scheduler determines the ordering of events in the queue. Examples: FIFOScheduler, EDFScheduler, user defined scheduler. 2)Dispatcher: Dispatcher determines the type of queues and threads used. Examples: RRobinDispatcher, user defined dispatcher. 3)Monitor: Allows for monitoring of events passed among components.

Version:
2.0
Author:
USC Soft. Arch. Group. Contact: Sam Malek malek@usc.edu
See Also:
Prism.core.FIFOScheduler, Prism.core.EDFScheduler, Prism.core.RRobinDispatcher

Constructor Summary
Scaffold()
          Simple constructor for Scaffold.
Scaffold(AbstractScheduler scheduler, AbstractDispatch dispatcher)
          Sets the scheduler and dispatcher for this scaffold.
 
Method Summary
 void call(java.lang.String command, Event param)
          If the value of parameter command is "add", it calls the "add" method of scheduler to add the event to the queue.
 AbstractDispatch getDispatcher()
           
 AbstractScheduler getScheduler()
           
 void setDispatcher(AbstractDispatch dispatcher)
          store to be used for message processing
 void setScheduler(AbstractScheduler scheduler)
          scheduler to be used for processing messages
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scaffold

public Scaffold()
Simple constructor for Scaffold. Creates a scaffold with a FIFO queue and a round-robin dispatcher.


Scaffold

public Scaffold(AbstractScheduler scheduler,
                AbstractDispatch dispatcher)
Sets the scheduler and dispatcher for this scaffold.

Method Detail

call

public void call(java.lang.String command,
                 Event param)
If the value of parameter command is "add", it calls the "add" method of scheduler to add the event to the queue. Otherwise, if the value of parameter command is "see", it calls the "see" method of monitor.

Specified by:
call in interface AbstractScaffold
Parameters:
command - Name of the method to be called
param - Parameters to be passed

setScheduler

public void setScheduler(AbstractScheduler scheduler)
scheduler to be used for processing messages


getScheduler

public AbstractScheduler getScheduler()

setDispatcher

public void setDispatcher(AbstractDispatch dispatcher)
store to be used for message processing


getDispatcher

public AbstractDispatch getDispatcher()