|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An object that is to be able to do the time management for your application has to implement this interface.
It is intended and therefore strongly recommended, that for higher flexibility implementations
of this interface use an object implementing the Time
interface to hold the current time and
delegate most of the functionality to that object.
Method Summary | |
void |
addTimerListener(TimerListener tlListener)
Adds a listener for TimerEvents fired by this timer. |
Object |
getInterval()
Get the current interval for calls to goAhead() . |
Object |
getTime()
Get the current time. |
Comparable |
getTimeStamp()
Create and return a fresh time stamp. |
void |
goAhead()
Increases the current time by an interval. |
void |
removeTimerListener(TimerListener tlListener)
Removes a listener for TimerEvents . |
void |
setInterval(Object oInterval)
Set the interval to be used by goAhead() .
|
void |
setTime(Object oTime)
Set the current time. |
Method Detail |
public void setTime(Object oTime) throws IllegalArgumentException
This method should call the equivalent method of the Time
object and fire a
timeSet
event.
Of course, IllegalArgumentException
s thrown by the Time
object must be
forwarded to the calling method.
oTime
- the time to be set
IllegalArgumentException
- if the time does not meet the time object's class or format
requirementsTimerListener.onTimeSet(sale.events.TimerEvent)
public Object getTime()
This method should call the equivalent method of the Time
object.
public void setInterval(Object oInterval)
goAhead()
.
An IllegalArgumentException
is not yet thrown because the new interval is only stored.
This method should fire an intervalSet
event.
oInterval
- the interval to be setTimerListener.onIntervalSet(sale.events.TimerEvent)
public Object getInterval()
goAhead()
.
public void addTimerListener(TimerListener tlListener)
TimerEvents
fired by this timer.
tlListener
- the listener to be addedTimerListener
public void removeTimerListener(TimerListener tlListener)
TimerEvents
.
tlListener
- the listener to be removedTimerListener
public void goAhead() throws IllegalArgumentException
This method should call the equivalent method at the Time
object passing the interval
set by through setInterval()
. If no interval has been set yet, the Time
object's getDefaultInterval()
method can be used to get a valid default.
Additionally, a goneAhead
event should be fired.
This method forwards IllegalArgumentExceptions
thrown by the Time object's
goAhead()
method to the calling method.
IllegalArgumentException
- if the interval does not meet the time object's class or format
requirementsTimerListener.onGoneAhead(sale.events.TimerEvent)
public Comparable getTimeStamp()
This method should call the Time
object's getTimeStamp()
method passing a long
value representing the number of the time stamp in this time period.
|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |