|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object obix.Obj obix.Ref obixserver.core.InvocationObj obixserver.watch.WatchManager
public class WatchManager
Manages watch and feed lifecycle, including watch and feed creation, removal, deletion. Represents a facade between the obix server engine and the watch subsystem.
Field Summary | |
---|---|
private Map |
feedMap
Maps feeds to objects that will be fed. |
private Map |
feedObjMap
Maps an obj to feed. |
private static Logger |
logger
|
private Map |
watchedObjMap
One obj can map to several watches. |
private Map |
watchMap
watchId -> watch map |
Fields inherited from class obixserver.core.InvocationObj |
---|
objBroker |
Constructor Summary | |
---|---|
WatchManager()
|
Method Summary | |
---|---|
void |
add(String watchId,
List objList)
Adds obj to watched list. |
void |
addFeed(obix.Feed feed,
List feedList)
Adds a set of objs to a feed. |
void |
addToFeed(obix.Feed feedObj,
obix.Obj obj)
Adds obj to all feeds associated with given feed obj. |
private void |
addToWatchedObjMap(obix.Obj obj,
Watch watch)
|
void |
clearFeed(obix.Feed feed)
Clears the feed so that it doesn't contains any Objs. |
private obix.Op |
createOp(String name,
obix.Contract in,
obix.Contract out)
|
private void |
deleteObjFromWatchesInWatchedObjMap(obix.Obj obj)
|
void |
deleteWatch(String watchId)
|
private void |
deleteWatchFromWatchedObjMap(Watch watch)
|
List |
getFeed(obix.Feed feed)
Return feed set for the given feed. |
int |
getWatchCount()
|
Watch |
getWatchForId(String watchId)
|
obix.Obj |
invoke(String name,
obix.Obj arg)
Invokes operation on this Obj. |
Watch |
makeWatch()
|
void |
notifyDelete(obix.Obj obj)
|
void |
notifyStatusChange(List objList)
Notify about status change for a list. |
void |
notifyStatusChange(obix.Obj obj)
Notify status changed for obj. |
List |
pollChanges(String watchId)
|
List |
pollRefresh(String watchId)
|
void |
remove(String watchId,
List objList)
Removes obj from watched list. |
private void |
removeFromWatchedObjMap(obix.Obj obj,
Watch watch)
|
obix.Obj |
watchToObj(Watch watch)
|
Methods inherited from class obixserver.core.InvocationObj |
---|
getOp, 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 |
Methods inherited from interface obix.IObj |
---|
add, addAll, get, getBool, getDisplay, getDisplayName, getHref, getIcon, getInt, getIs, getName, getNormalizedHref, getParent, getReal, getRoot, getStatus, getStr, isAbstime, isBool, isEnum, isErr, isFeed, isInt, isList, isNull, isOp, isReal, isRef, isReltime, isStr, isUri, isVal, isWritable, list, remove, removeThis, replace, setBool, setDisplay, setDisplayName, setHref, setIcon, setInt, setIs, setNull, setReal, setStatus, setStr, setWritable, setWritable, size, toDisplayName, toDisplayString |
Field Detail |
---|
private static final Logger logger
private Map watchMap
private Map watchedObjMap
private Map feedMap
private Map feedObjMap
Constructor Detail |
---|
public WatchManager()
Method Detail |
---|
public void add(String watchId, List objList)
watchId
- objList
- list of obj's to watch. May contain
Err obj which should be ignored.public void remove(String watchId, List objList)
watchId
- objList
- list of objects to removepublic void notifyStatusChange(obix.Obj obj)
obj
- public void notifyStatusChange(List objList)
objList
- public void notifyDelete(obix.Obj obj)
public Watch getWatchForId(String watchId)
public Watch makeWatch()
public void deleteWatch(String watchId)
public List pollChanges(String watchId)
public List pollRefresh(String watchId)
watchId
-
public int getWatchCount()
public void addFeed(obix.Feed feed, List feedList)
feed
- feedList
- public void addToFeed(obix.Feed feedObj, obix.Obj obj)
feedObj
- obj
- public void clearFeed(obix.Feed feed)
feed
- feed to be cleared.public List getFeed(obix.Feed feed)
feed
-
public obix.Obj invoke(String name, obix.Obj arg)
invoke
in interface InvocationTarget
invoke
in class InvocationObj
public obix.Obj watchToObj(Watch watch)
private obix.Op createOp(String name, obix.Contract in, obix.Contract out)
private void deleteObjFromWatchesInWatchedObjMap(obix.Obj obj)
private void deleteWatchFromWatchedObjMap(Watch watch)
private void addToWatchedObjMap(obix.Obj obj, Watch watch)
private void removeFromWatchedObjMap(obix.Obj obj, Watch watch)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |