issrg.test.ptb
Class PTBClock
java.lang.Object
issrg.pba.rbac.Time
issrg.pba.rbac.Clock
issrg.test.ptb.PTBClock
- All Implemented Interfaces:
- java.lang.Comparable
public class PTBClock
- extends Clock
This class is the adapted implementation of the Clock interface for the Permis Test Bench. It
has a method to specify a particular date to be returned. In this way, we are able to
change the date used to perform the decisions.
Method Summary |
java.util.Date |
getTime()
This method returns the time returned by the last call to latch, so all
calculations
will be consistent. |
java.util.Date |
latch()
This method gets the actual time and keeps it for later reference. |
boolean |
setTime(java.lang.String s)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PTBClock
public PTBClock()
getTime
public java.util.Date getTime()
- Description copied from class:
Clock
- This method returns the time returned by the last call to latch, so all
calculations
will be consistent.
- Specified by:
getTime
in class Clock
- Returns:
- the time returned by the last call to latch
latch
public java.util.Date latch()
- Description copied from class:
Clock
- This method gets the actual time and keeps it for later reference.
Subsequent
calls to getTime will return the same value (needed in operations extended
in time).
- Specified by:
latch
in class Clock
- Returns:
- the current time
setTime
public boolean setTime(java.lang.String s)