JACK 5.4 Application Interface

aos.jack.jak.cursor
Class ObserverCursor

java.lang.Object
  extended byaos.jack.jak.util.Watchable
      extended byaos.jack.jak.cursor.Cursor
          extended byaos.jack.jak.cursor.ObserverCursor
All Implemented Interfaces:
ObservableInt, java.util.Observer

public abstract class ObserverCursor
extends Cursor
implements java.util.Observer

This is a abstract cursor that does most of the work for waiting on objects that support the java Observable or JACK ObservableInt interfaces. It implements the registration of @wait_fors etc and triggering but leaves the testing and registration with the Observable to the base class. Note, derived classes must implement next(), reset(), undo() and be sure they only return true once.


Field Summary
 
Fields inherited from class aos.jack.jak.cursor.Cursor
FALSE, falseCursor, TRUE, trueCursor, UNKNOWN
 
Constructor Summary
ObserverCursor()
           
 
Method Summary
 boolean isTriggered()
          Returns true.
 void register(java.util.Observer o)
           
 boolean unRegister(java.util.Observer o)
           
 void update(java.util.Observable o, java.lang.Object a)
           
 
Methods inherited from class aos.jack.jak.cursor.Cursor
finished, negate, next, reset, undo
 
Methods inherited from class aos.jack.jak.util.Watchable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObserverCursor

public ObserverCursor()
Method Detail

isTriggered

public boolean isTriggered()
Returns true.

Overrides:
isTriggered in class Cursor

update

public void update(java.util.Observable o,
                   java.lang.Object a)
Specified by:
update in interface java.util.Observer

register

public void register(java.util.Observer o)
Overrides:
register in class Cursor

unRegister

public boolean unRegister(java.util.Observer o)
Overrides:
unRegister in class Cursor

JACK 5.4 Application Interface

Copyright (C) 1999-2008, Agent Oriented Software Pty. Ltd.

US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.


Agent Oriented Software Pty. Ltd.     http://www.aosgrp.com
PO Box 639, Carlton South, Victoria 3053, Australia
Phone: +61 3 9349 5055, Fax: +61 3 9349 5088