Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.ide.util
Class ContextWatcher

java.lang.Object
  extended by oracle.ide.util.ContextWatcher
All Implemented Interfaces:
Observer, WeakDataHolder

Deprecated. since 11.1.1 with no replacement.

public final class ContextWatcher
extends java.lang.Object
implements Observer, WeakDataHolder

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

startWatching

public static void startWatching(ContextHolder holder)
Deprecated. 
Start watching the Context held by the given ContextHolder.

Parameters:
holder - the ContextHolder whose Context is to be monitored.

stopWatching

public static void stopWatching(ContextHolder holder)
Deprecated. 
Stop watching the Context held by the given ContextHolder.

Parameters:
holder - the ContextHolder whose Context is to no longer be watched.

dataExpired

public void dataExpired(WeakDataReference data)
Deprecated. 
A weakly referenced ContextHolder has been garbage collected.

Specified by:
dataExpired in interface WeakDataHolder
Parameters:
data - the WeakDataReference to the ContextHolder that was collected.

isExpired

public boolean isExpired()
Deprecated. 
Ignored by this implementation.

Specified by:
isExpired in interface WeakDataHolder
Returns:
Always returns false.

update

public 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.

Specified by:
update in interface Observer
Parameters:
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.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.