edu.rit.slides
Interface Projector

All Known Implementing Classes:
ProjectorObject

public interface Projector

Interface Projector is the remote interface for an exported projector object in the Slides application.

A group of one or more screen objects is attached to a multihandle for interface Screen; this group of screen objects is called a theatre. Using the multihandle, a client can invoke methods on all screens in the theatre. The client is typically a Projector object.

The screen objects and the projector objects interact as follows. A projector object repeatedly calls availableSlides() on a Screen multihandle to tell all screen objects in the theatre which slides the projector object has available. In response, the screen objects start calling getSlide() on the projector object to get the individual slides one at a time.

If no availableSlides() method call arrives from a certain projector within a certain leasetime (for example, leasetime = 30 seconds), the screen objects conclude that the projector object has gone away, and the screen objects discard the slides they had obtained from that projector object. To avoid correlated broadcasts, each projector object calls availableSlides() at intervals chosen at random in the range (0.2 leasetime) to (0.4 leasetime) (for example, 6 to 12 seconds). Thus, a screen object should receive at least two availableSlides() method calls from a projector object before timing out. This lets the screen objects tolerate the occasional loss of one availableSlides() method call.

A screen object calls getSlide() on a projector object's unihandle to get a certain slide. In response, the projector object calls putSlide() on a Screen multihandle to send the slide to all screens in the theatre.

A projector object repeatedly calls displaySlides() on a Screen multihandle to tell all screens in the theatre to display a particular slide or slides.

If no displaySlides() method call arrives from a certain projector within a certain leasetime (for example, leasetime = 30 seconds), the screen objects conclude that the projector object has gone away, and the screen objects stop displaying the slides from that projector object. To avoid correlated broadcasts, each projector object calls displaySlides() at intervals chosen at random in the range (0.2 leasetime) to (0.4 leasetime) (for example, 6 to 12 seconds). Thus, a screen object should receive at least two displaySlides() method calls from a projector object before timing out. This lets the screen objects tolerate the occasional loss of one displaySlides() method call.

The process of transferring slides from projector objects to screen objects is broken up into separate method calls (availableSlides() -- getSlide() -- putSlide()) to give the screen objects flexibility in when they obtain the slides. A screen object need not obtain all the slides at once. A screen object can obtain slides one at a time as needed. Or, to reduce the latency when displaying a slide, a screen object can obtain slides a few at a time, ahead of time. Obtaining the slides one at a time also lets other network traffic be interleaved with the slide traffic.

The slide itself is not sent as an argument of the displaySlides() method to reduce the latency when displaying a slide or slides. The intent is that the screen object would already have obtained the slides in response to an earlier availableSlides() method call. The screen object can then display the slides immediately, without having to wait for the slides to come across the network. Of course, if the screen object does not have the specified slides, the screen object will have to ask the projector object to send them (getSlide()) and wait for the slides to arrive (putSlide()) before the screen object can display them.


Method Summary
 void getSlide(Eoid theSlideID)
          Get the given slide from this projector.
 

Method Detail

getSlide

void getSlide(Eoid theSlideID)
Get the given slide from this projector.

Parameters:
theSlideID - Slide ID (type Eoid).


Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.