previous up next
Go backward to Scheduler: Program Schedulers
Go up to 4.1 Types
Go forward to MessageQueue: Message Queues
RISC-Linz logo

Selector: Message Selectors

interface Selector
{
  Message select(MessageQueue queue);
}

A selector returns the next message to be delivered from a channel from the queue of messages stored in the channel; it also updates the queue.

The default selector returns the oldest message in a channel (i.e., the message which was sent first); it is an object of type

class SelectorDefault implements Selector
{
  Message select(MessageQueue queue)
  {
    return queue.dequeue();
  }
}

The default selector may be redefined to implement different kind of channel failure modes (lost messages, duplicated messages, ...).


Maintainer: Wolfgang Schreiner
Last Modification: November 14, 1997

previous up next