issrg.pba.rbac
Class SystemClock

java.lang.Object
  extended byissrg.pba.rbac.Time
      extended byissrg.pba.rbac.Clock
          extended byissrg.pba.rbac.SystemClock

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
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
register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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