Class w3c.jigsaw.contrib.SalvagerResource
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.contrib.SalvagerResource

java.lang.Object
   |
   +----w3c.tools.store.AttributeHolder
           |
           +----w3c.tools.store.Resource
                   |
                   +----w3c.jigsaw.resources.HTTPResource
                           |
                           +----w3c.jigsaw.resources.FilteredResource
                                   |
                                   +----w3c.jigsaw.contrib.SalvagerResource

public class SalvagerResource
extends FilteredResource

Variable Index

 o ATTR_LOGNAME
Attribute index - The salvager log.
 o engine
The engine currently running, or null.
 o log
The log, as a RandomAccessFile
 o logfile
The log file to use (if any)
 o report
The last walker's report.
 o started
Date at which the currernt salvage was started.
 o thread
The power for the engine, when needed.
 o verified
Did we run a verify stage since last safe report ?
 o walker
The walk handler.

Constructor Index

 o SalvagerResource()

Method Index

 o acceptUnload()
This resource should never be unloaded.
 o dumpReport(HtmlGenerator)
Dump the last report, if any into given stream.
 o get(Request)
Redirect all requests to the log, when possible.
 o getEngine()
Get the walker engine currently running.
 o getLogname()
Get the salvager's resource log name.
 o initialize(Object[])
Initialization method for attribute holders.
 o interruptSalvage()
Interrupt the current walker, if any.
 o notifyUnload()
This resource is being unloaded.
 o setValue(int, Object)
Catch setValue, to maintain cached header values correctness.
 o startSalvage()
Start the salvage process.
 o walkerDone(ResourceWalker, SalvagerReport)
Callback, for the walker to notify the end of salvaging.

Variables

 o ATTR_LOGNAME
  protected static int ATTR_LOGNAME
Attribute index - The salvager log.
 o engine
  protected WalkerEngine engine
The engine currently running, or null.
 o thread
  protected Thread thread
The power for the engine, when needed.
 o walker
  protected ResourceWalker walker
The walk handler.
 o log
  protected PrintStream log
The log, as a RandomAccessFile
 o report
  protected SalvagerReport report
The last walker's report.
 o verified
  protected boolean verified
Did we run a verify stage since last safe report ?
 o started
  protected long started
Date at which the currernt salvage was started.
 o logfile
  protected File logfile
The log file to use (if any)

Constructors

 o SalvagerResource
  public SalvagerResource()

Methods

 o setValue
  public void setValue(int idx,
                       Object value)
Catch setValue, to maintain cached header values correctness.
Overrides:
setValue in class HTTPResource
 o getEngine
  protected synchronized WalkerEngine getEngine()
Get the walker engine currently running.
Returns:
A WalkerEngine instance, or null if no engine is currently running.
 o walkerDone
  protected synchronized void walkerDone(ResourceWalker walker,
                                         SalvagerReport report)
Callback, for the walker to notify the end of salvaging.
Parameters:
walker - The walker that is done.
report - The walker's report
 o startSalvage
  protected synchronized boolean startSalvage()
Start the salvage process.
Returns:
A boolean, true if salvager launched, false if salvager was already running.
 o interruptSalvage
  protected synchronized void interruptSalvage()
Interrupt the current walker, if any.
 o getLogname
  public String getLogname()
Get the salvager's resource log name.
Returns:
A String filename.
 o acceptUnload
  public synchronized boolean acceptUnload()
This resource should never be unloaded.
Overrides:
acceptUnload in class Resource
 o notifyUnload
  public void notifyUnload()
This resource is being unloaded.
Overrides:
notifyUnload in class Resource
 o dumpReport
  protected void dumpReport(HtmlGenerator g)
Dump the last report, if any into given stream.
Parameters:
g - The HtmlGenerator to dump to.
 o get
  public Reply get(Request request) throws HTTPException
Redirect all requests to the log, when possible.
Returns:
A Reply instance.
Throws: HTTPException
If performing the request failed.
Overrides:
get in class HTTPResource
 o initialize
  public void initialize(Object values[])
Initialization method for attribute holders.
Overrides:
initialize in class AttributeHolder

All Packages  Class Hierarchy  This Package  Previous  Next  Index