issrg.pba.rbac
Class SystemClock

java.lang.Object
  extended by issrg.pba.rbac.Time
      extended by issrg.pba.rbac.Clock
          extended by issrg.pba.rbac.SystemClock
All Implemented Interfaces:
java.lang.Comparable

public class SystemClock
extends Clock

This class is the simplest implementation of the Clock interface and returns just system time to the caller. Note that this might not be secure enough for certain applications.


Field Summary
 
Fields inherited from class issrg.pba.rbac.Time
log, s_defaultTimeZone, TIME_TYPE
 
Constructor Summary
SystemClock()
           
 
Method Summary
 java.util.Date getTime()
          This method returns the time that was at the last call to latch() method.
 java.util.Date latch()
          Sets the time for the next calls to getTime and returns the current system time.
 
Methods inherited from class issrg.pba.rbac.Clock
getEvaluationTime
 
Methods inherited from class issrg.pba.rbac.Time
calendarToTime, calendarToTime, compareTo, equals, getDefaultTimeZone, parse, register, setDefaultTimeZone, setDefaultTimeZone, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SystemClock

public SystemClock()
Method Detail

getTime

public java.util.Date getTime()
This method returns the time that was at the last call to latch() method. If latch() wasn't called at all, it is called at this time.

Specified by:
getTime in class Clock
Returns:
the time returned by the last call to latch

latch

public java.util.Date latch()
Sets the time for the next calls to getTime and returns the current system time.

Specified by:
latch in class Clock
Returns:
the time as set on the local conputer