Extension SDK 10.1.3.36.73

oracle.jdeveloper.java.provider
Class CachedFileProvider.NodeObserver

java.lang.Object
  extended byoracle.ide.model.NodeListener
      extended byoracle.jdeveloper.java.provider.CachedFileProvider.NodeObserver
All Implemented Interfaces:
Observer
Enclosing class:
CachedFileProvider

protected class CachedFileProvider.NodeObserver
extends NodeListener
implements Observer

The NodeObserver attaches to nodes for which we have created SourceFile instances for, and tracks the given node until the node is closed, or renamed. This observer will take care of expiring the SourceFile for the given URL when these events occur, or when the node is modified or reloaded.


Constructor Summary
protected CachedFileProvider.NodeObserver(Node node, java.net.URL sourceURL)
           
 
Method Summary
 void nodeClosed(NodeEvent event)
          Called after a Node has been closed.
 void nodeRenamed(NodeEvent event, java.net.URL oldURL, java.net.URL newURL)
          Called after a Node has been renamed and recached under the new URL in the NodeFactory.
 void update(java.lang.Object observed, UpdateMessage change)
          Notification message.
 
Methods inherited from class oracle.ide.model.NodeListener
nodeDeleted, nodeDirtyStateChanged, nodeOpened, nodeReverted, nodeSaved, nodeWillBeSaved, nodeWillClose, nodeWillOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedFileProvider.NodeObserver

protected CachedFileProvider.NodeObserver(Node node,
                                          java.net.URL sourceURL)
Method Detail

nodeClosed

public void nodeClosed(NodeEvent event)
Description copied from class: NodeListener
Called after a Node has been closed.

Overrides:
nodeClosed in class NodeListener
Parameters:
event - the object containing information about this event

nodeRenamed

public void nodeRenamed(NodeEvent event,
                        java.net.URL oldURL,
                        java.net.URL newURL)
Description copied from class: NodeListener
Called after a Node has been renamed and recached under the new URL in the NodeFactory.

Overrides:
nodeRenamed in class NodeListener
Parameters:
event - the object containing information about this event. Calling e.getNode() will return the old Node. To get the new Node, call NodeFactory.find(newURL). Both old and new Nodes remain available while NodeListeners are being called with the nodeRenamed event. In the case where renaming did not cause the Node type to change, both old Node and new Node will be the exact same object, so using the oldURL parameter is the only reliable way to know the URL of the Node before it was renamed. If the Node type did change, the old Node is removed from the NodeFactory cache immediately after all NodeListeners have been called with the nodeRenamed event.
oldURL - the old URL of the Node before the rename
newURL - the new URL of the Node after the rename

update

public void update(java.lang.Object observed,
                   UpdateMessage change)
Description copied from interface: Observer
Notification message. Subjects call this method when they notify their observers that the subjects state has changed.

Specified by:
update in interface Observer
Parameters:
observed - the subject whose state has changed.
change - what has changed.

Extension SDK 10.1.3.36.73

 

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