|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.util.ContextWatcher
public final class ContextWatcher
ContextWatcher offers a proxy watcher facility such that multiple ContextHolder objects can be notified upon Context changes, though only the single ContextWatcher acts as Observer upon the Node, Project and Workspace of the Context. The purpose of this class is to reduce message traffic due to simple content changes within a Node by having a single Observer filter the messages, forwarding notification only upon those messages interesting to a ContextHolder. This class only works for a Context describing a single Node available from the getNode method.
ContextHolder references are held as WeakDataReference and thus need not worry about dangling references.
If the Context of a ContextHolder is changed for any reason other than a notification from ContextWatcher, then the ContextHolder should call stopWatching passing in the old Context, then call startWatching again using the new Context.
Method Summary | |
---|---|
void |
dataExpired(WeakDataReference data)
Deprecated. A weakly referenced ContextHolder has been garbage collected. |
boolean |
isExpired()
Deprecated. Ignored by this implementation. |
static void |
startWatching(ContextHolder holder)
Deprecated. Start watching the Context held by the given ContextHolder. |
static void |
stopWatching(ContextHolder holder)
Deprecated. Stop watching the Context held by the given ContextHolder. |
void |
update(java.lang.Object observed,
UpdateMessage change)
Deprecated. Respond to a name change message for any of the Context's Node, Project or Workspace, and to a child removed message removing the Node from the Project, the Project from the Workspace or the Workspace from the Ide workspaces. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void startWatching(ContextHolder holder)
holder
- the ContextHolder whose Context is to be monitored.public static void stopWatching(ContextHolder holder)
holder
- the ContextHolder whose Context is to no longer be watched.public void dataExpired(WeakDataReference data)
dataExpired
in interface WeakDataHolder
data
- the WeakDataReference to the ContextHolder that was collected.public boolean isExpired()
isExpired
in interface WeakDataHolder
public void update(java.lang.Object observed, UpdateMessage change)
update
in interface Observer
observed
- the Node, Project, or Workspace.change
- the change message.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |