org.isam.exehda.services.ctxm
Class ContextEvent

java.lang.Object
  |
  +--org.isam.exehda.services.ctxm.ContextEvent

class ContextEvent
extends java.lang.Object

Event that describes a change in the state of a context element.

Version:
$Date: 2004/12/31 21:19:46 $ $Revision: 1.3 $
Author:
last modified by $Author: lucc $
To do:
RT issue: what about event time-stamps and deadline?

Constructor Summary
ContextEvent(ContextManager.ContextState prev, ContextManager.ContextState curr, long timeStamp)
          Creates a new ContextEvent instance.
 
Method Summary
 ContextManager.Context getContextType()
          Returns the context element to which this context change event is related.
 ContextManager.ContextState getPreviousState()
          Returns the previous state of the context element.
 ContextManager.ContextState getState()
          Returns the current (new) state of the context element.
 long getTimeStamp()
          The time-stamp describing the moment when this event was generated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextEvent

public ContextEvent(ContextManager.ContextState prev,
                    ContextManager.ContextState curr,
                    long timeStamp)
Creates a new ContextEvent instance. Either prev or curr may be null but not both.

Parameters:
prev - the previous state of the context element.
curr - the current (new) state of the context element.
timeStamp - the time-stamp for the event in milliseconds since 1970.
Method Detail

getContextType

public ContextManager.Context getContextType()
Returns the context element to which this context change event is related.

Returns:
a Context value

getPreviousState

public ContextManager.ContextState getPreviousState()
Returns the previous state of the context element.

Returns:
the previous state or null if it is undefined/unknown.

getState

public ContextManager.ContextState getState()
Returns the current (new) state of the context element.

Returns:
the current state or null if it is undefined/unknown.

getTimeStamp

public long getTimeStamp()
The time-stamp describing the moment when this event was generated.

Returns:
a long value