obixserver.core.alarm
Class AlarmImpl

java.lang.Object
  extended by obix.Obj
      extended by obix.Ref
          extended by obixserver.core.InvocationObj
              extended by obixserver.core.alarm.AlarmImpl
All Implemented Interfaces:
obix.contracts.Alarm, obix.contracts.PointAlarm, obix.contracts.StatefulAlarm, obix.IObj, InvocationTarget

public class AlarmImpl
extends InvocationObj
implements obix.contracts.PointAlarm, obix.contracts.StatefulAlarm

Alarm implementation for a generic alarm service.


Field Summary
private static long alarmIdCounter
          Used to generate pseudo unique ids.
private  obix.Abstime normalTimestamp
           
private  obix.Ref ref
           
private  obix.Abstime timestamp
           
private  obix.Obj value
           
 
Fields inherited from class obixserver.core.InvocationObj
objBroker
 
Fields inherited from interface obix.contracts.StatefulAlarm
normalTimestampContract
 
Constructor Summary
AlarmImpl(obix.Obj obj)
           
 
Method Summary
 obix.Obj alarmValue()
           
private static String generateId()
          Generates an id.
 obix.Abstime normalTimestamp()
           
 obix.Ref source()
           
 obix.Abstime timestamp()
           
 
Methods inherited from class obixserver.core.InvocationObj
getOp, invoke, setObjBroker
 
Methods inherited from class obix.Ref
getElement, getResolved, isResolved, toString
 
Methods inherited from class obix.Obj
add, add, addAll, dump, get, getBool, getChildHref, getDisplay, getDisplayName, getHref, getIcon, getInt, getIs, getName, getNormalizedHref, getParent, getReal, getRoot, getStatus, getStr, has, is, is, isAbstime, isBool, isEnum, isErr, isFeed, isInt, isList, isNull, isOp, isReal, isRef, isReltime, isStr, isUri, isVal, isWritable, list, list, remove, removeThis, replace, setBool, setDisplay, setDisplayName, setHref, setIcon, setInt, setIs, setName, setNull, setReal, setStatus, setStr, setWritable, setWritable, size, toClass, toDisplayName, toDisplayString, toObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ref

private obix.Ref ref

timestamp

private obix.Abstime timestamp

normalTimestamp

private obix.Abstime normalTimestamp

value

private obix.Obj value

alarmIdCounter

private static long alarmIdCounter
Used to generate pseudo unique ids.

Constructor Detail

AlarmImpl

public AlarmImpl(obix.Obj obj)
Method Detail

source

public obix.Ref source()
Specified by:
source in interface obix.contracts.Alarm

timestamp

public obix.Abstime timestamp()
Specified by:
timestamp in interface obix.contracts.Alarm

alarmValue

public obix.Obj alarmValue()
Specified by:
alarmValue in interface obix.contracts.PointAlarm

normalTimestamp

public obix.Abstime normalTimestamp()
Specified by:
normalTimestamp in interface obix.contracts.StatefulAlarm

generateId

private static String generateId()
Generates an id. This implementation will change when stop/restart session persistence is implemented.

Returns:
generated id


Copyright © 2006-2008 Peter Michalek All Rights Reserved.