org.argouml.cognitive.critics
Class SnoozeOrder

java.lang.Object
  extended byorg.argouml.cognitive.critics.SnoozeOrder
All Implemented Interfaces:
Serializable

public class SnoozeOrder
extends Object
implements Serializable

A Critic can be disabled for a certain amount of time by giving it the snooze command. Whereas most ControlMech's activate or deactivate Critic's based on evidence of the Designer's state of mind, this command allows the Designer to disable Critic's without stating any reason. However, after a period of time, the critic may become active again. We think this will often be convienent because Designer's have a lot of tacit knowledge about their own state of mind that is not worth making explicit.

See Also:
Serialized Form

Field Summary
private  long initialIntervalMS
          The initial sleeping time.
private  long interval
          The sleeping time, including the effects of repeated snoozeing.
private static Logger LOG
          logger
private  Date now
           
private  Date snoozeAgain
          Ifthe designer snoozees the critics again before this time, then go to sleep for even longer.
private  Date snoozeUntil
          Critic should sleep until this time.
 
Constructor Summary
SnoozeOrder()
          The constructor.
 
Method Summary
private  Date getNow()
           
 boolean getSnoozed()
           
protected  long nextInterval(long last)
           
 void setSnoozed(boolean h)
           
 void snooze()
          Snooze the critic.
 void unsnooze()
          Unsnooze the critic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Logger LOG
logger


initialIntervalMS

private final long initialIntervalMS
The initial sleeping time.

See Also:
Constant Field Values

snoozeUntil

private Date snoozeUntil
Critic should sleep until this time.


snoozeAgain

private Date snoozeAgain
Ifthe designer snoozees the critics again before this time, then go to sleep for even longer.


interval

private long interval
The sleeping time, including the effects of repeated snoozeing.


now

private Date now
Constructor Detail

SnoozeOrder

public SnoozeOrder()
The constructor.

Method Detail

getNow

private Date getNow()

getSnoozed

public boolean getSnoozed()
Returns:
true if snoozed

setSnoozed

public void setSnoozed(boolean h)
Parameters:
h - if true, then snooze, else unsnooze

snooze

public void snooze()
Snooze the critic.


unsnooze

public void unsnooze()
Unsnooze the critic.


nextInterval

protected long nextInterval(long last)
Parameters:
last - the previous interval
Returns:
the next longer interval


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook