org.exolab.jms.messagemgr
Class TimedCondition

java.lang.Object
  |
  +--org.exolab.jms.messagemgr.TimedCondition
All Implemented Interfaces:
Condition

public class TimedCondition
extends java.lang.Object
implements Condition

A timed Condition.

Version:
$Revision: 1.1 $ $Date: 2005/08/30 06:23:11 $
Author:
Tim Anderson

Method Summary
static Condition after(long time)
          Create a new TimedCondition that evaluates true while the current time >= Now + time
static Condition before(long time)
          Create a new TimedCondition that evaluates true while the current time < Now + time
 boolean get()
          Evaluates the condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public boolean get()
Evaluates the condition.
Specified by:
get in interface Condition
Returns:
the value of the condition

before

public static Condition before(long time)
Create a new TimedCondition that evaluates true while the current time < Now + time
Parameters:
time - the relative time, in milliseconds
Returns:
a condition that evaluates true while the current time < Now + time

after

public static Condition after(long time)
Create a new TimedCondition that evaluates true while the current time >= Now + time
Parameters:
time - the relative time, in milliseconds
Returns:
a condition that evaluates true while the current time >= Now + time


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.