    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Interface w3c.tools.store.ResourceWalker

public interface ResourceWalker
extends Object

An interface for walking through a set of resources.

See Also:
  WalkerEngine

##

handleCycle(String, String[], String[])
  The walker engine has detected a cycle.
handleDone(Hashtable)
  The whole tree of resources has been walked through.
handleException(String[], int, Exception)
  An exception occured while trying to visit a resource.
handleInterruption()
  The underlying resource walker has been interrupted.
handleResource(Resource)
  Time to handle the given resource.

##

handleResource

      public abstract boolean handleResource(Resource resource)

  Time to handle the given resource. The resource walker is now visiting the given resource.
  Parameters:
    resource - The resource being visited.
  Returns:
    A boolean, true if that resource's children are to be visited, false otherwise.

handleException

      public abstract void handleException(String path[],
                                           int err,
                                           Exception ex)

  An exception occured while trying to visit a resource.
  Parameters:
    path - The full path of the resource from root of walk.
    err - The index of component within path we couldn't lookup.
    ex - The exception the walker got while trying to get the children resource.

handleCycle

      public abstract void handleCycle(String storeid,
                                       String from[],
                                       String target[])

  The walker engine has detected a cycle. Cycles are detected when a resource store is about to be revisited. Instead of going into an infinite loop, the walker notifies the walker of the cycle, and does not re-walk the resource store.
  Parameters:
    storeid - The identifier of the store on which the cycle was detected.
    from - The path of the resource (from the root of the walk) that points to that store.
    target - The path of the resource that already triggered a visit of that store.

handleInterruption

      public abstract void handleInterruption()

  The underlying resource walker has been interrupted.

handleDone

      public abstract void handleDone(Hashtable stores)

  The whole tree of resources has been walked through.
  Parameters:
    stores - Hashtable mapping the identifiers (a String) of visited stores to the path (a String array) of the resource (starting from the root of the walk).

    All Packages  Class Hierarchy  This Package  Previous  Next  Index