ostore.oil
Class SegmentPager

java.lang.Object
  |
  +--ostore.oil.SegmentPager
All Implemented Interfaces:
EventHandlerIF

public class SegmentPager
extends Object
implements EventHandlerIF

A stage which fetches model segments to/from remote carriers.

Version:
$Id: SegmentPager.java,v 1.13 2002/07/22 20:54:53 srhea Exp $
Author:
Dennis Geels

Nested Class Summary
static class SegmentPager.Request
           
static class SegmentPager.ReverseRequest
           
 
Field Summary
protected  Model model
          For now we store segments inside one huge Model.
protected  String name
          The name by which to refer to this stage.
 
Constructor Summary
SegmentPager()
           
 
Method Summary
 void destroy()
           
 void handle_request(SegmentPager.Request req)
          Processes a Request.
 void handle_reverse_request(SegmentPager.ReverseRequest req)
          Processes a ReverseRequest.
 void handleEvent(QueueElementIF elem)
           
 void handleEvents(QueueElementIF[] elemarr)
           
 void init(ConfigDataIF config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name
The name by which to refer to this stage. It should be the name of the corresponding StageIF.


model

protected Model model
For now we store segments inside one huge Model.

Constructor Detail

SegmentPager

public SegmentPager()
Method Detail

handle_request

public void handle_request(SegmentPager.Request req)
Processes a Request. If this SegmentPager has a copy of the requested Segment, it dispatches it. If not, it should fetch the Segment from a remote carrier (not yet implemented).


handle_reverse_request

public void handle_reverse_request(SegmentPager.ReverseRequest req)
Processes a ReverseRequest. The SegmentPager scans its local Segments for any containing the specified entry. If none are found, it should forward the request to a remote carrier (not yet implemented).


handleEvent

public void handleEvent(QueueElementIF elem)
                 throws UnknownEventException
Specified by:
handleEvent in interface EventHandlerIF
UnknownEventException

handleEvents

public void handleEvents(QueueElementIF[] elemarr)
                  throws UnknownEventException
Specified by:
handleEvents in interface EventHandlerIF
UnknownEventException

init

public void init(ConfigDataIF config)
          throws Exception
Specified by:
init in interface EventHandlerIF
Exception

destroy

public void destroy()
Specified by:
destroy in interface EventHandlerIF