## org.w3c.tools.resources
Class DummyResourceReference

    java.lang.Object
      |
      +--org.w3c.tools.resources.DummyResourceReference

public class DummyResourceReference
extends java.lang.Object
implements ResourceReference

This class implements the ResourceReference interface. For external use only. The ResourceStoreManager has its own Reference class.

Field Summary
`protected int` | `lockCount` The lock count associated to the reference.

Constructor Summary
`DummyResourceReference(Resource resource)`

Method Summary
`void` | `invalidate()` Set this reference as invalid.
`boolean` | `isLocked()` Is that resource reference locked ?
`Resource` | `lock()` Lock the refered resource in memory.
`int` | `nbLock()` How many locks?
`void` | `unlock()` Unlock that resource from memory.
`void` | `updateContext(ResourceContext ctxt)` update the cached context of that reference.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### lockCount

    protected int lockCount

  The lock count associated to the reference.

Constructor Detail

### DummyResourceReference

    public DummyResourceReference(Resource resource)

  Parameters:
    `resource` - The resource to reference.

Method Detail

### updateContext

    public void updateContext(ResourceContext ctxt)

  update the cached context of that reference.
  Specified by:
    updateContext in interface ResourceReference
  Parameters:
    `ctxt` - the new ResourceContext.

### lock

    public Resource lock()
                  throws InvalidResourceException

  Lock the refered resource in memory.
  Specified by:
    lock in interface ResourceReference
  Returns:
    A real pointer to the resource.
  Throws:
    InvalidResourceException - is thrown if the resource is invalid (has been deleted or everything else).

### nbLock

    public int nbLock()

  How many locks?
  Specified by:
    nbLock in interface ResourceReference
  Returns:
    an int.

### unlock

    public void unlock()

  Unlock that resource from memory.
  Specified by:
    unlock in interface ResourceReference

### isLocked

    public boolean isLocked()

  Is that resource reference locked ?
  Specified by:
    isLocked in interface ResourceReference

### invalidate

    public void invalidate()

  Set this reference as invalid.