All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.ssi.SSIResource

java.lang.Object
   |
   +----w3c.tools.store.AttributeHolder
           |
           +----w3c.tools.store.Resource
                   |
                   +----w3c.jigsaw.resources.HTTPResource
                           |
                           +----w3c.jigsaw.resources.FilteredResource
                                   |
                                   +----w3c.jigsaw.resources.FileResource
                                           |
                                           +----w3c.jigsaw.ssi.SSIResource

public class SSIResource
extends FileResource
This resource implements server-side parsing of HTML documents. Any comment of the form <!--#commandName param1=val1 ... paramn=valn --> will be interpreted as an include directive.

Commands are looked up in an instance of the class supplied in the registryClass attribute, which must be a subclass of w3c.jigsaw.ssi.CommandRegistry.

See Also:
CommandRegistry, Command

Variable Index

 o STATE_DEPTH
Message state - the current recursion depth
 o STATE_VARIABLES
Message state - the current variables
 o vars
Our "very global" variables

Constructor Index

 o SSIResource()

Method Index

 o byteArrayNEquals(byte[], int, byte[], int, int)
Analogous to standard C's strncmp, for byte arrays.
 o createCommandReply(Request, int)
 o createDefaultReply(Request, int)
Create a reply to answer to request on this file.
 o get(Request)
The GET method on files.
 o getLastModified()
Get this resource last modification time.
 o handle(Request)
Handles all relevant HTTP methods.
 o perform(Request)
Makes sure that checkContent() is called on _any_ HTTP method, so that the internal representation of commands is always consistent.
 o post(Request)
The default POST method replies with a not implemented.
 o updateFileAttributes()
Updates the attributes and instance variables that depend on the file.

Variables

 o vars
 protected Dictionary vars
Our "very global" variables

 o STATE_DEPTH
 public static final String STATE_DEPTH
Message state - the current recursion depth

 o STATE_VARIABLES
 public static final String STATE_VARIABLES
Message state - the current variables

Constructors

 o SSIResource
 public SSIResource()

Methods

 o updateFileAttributes
 public void updateFileAttributes()
Updates the attributes and instance variables that depend on the file.

Overrides:
updateFileAttributes in class FileResource
 o perform
 public Reply perform(Request request) throws HTTPException, ClientException
Makes sure that checkContent() is called on _any_ HTTP method, so that the internal representation of commands is always consistent.

Parameters:
request - The HTTPRequest
filters - The filters to apply
Overrides:
perform in class HTTPResource
 o get
 public Reply get(Request request) throws HTTPException
The GET method on files.

Overrides:
get in class FileResource
 o post
 public Reply post(Request request) throws HTTPException, ClientException
The default POST method replies with a not implemented.

Overrides:
post in class HTTPResource
 o handle
 public Reply handle(Request request) throws HTTPException
Handles all relevant HTTP methods. Merges the partial replies from each of the segments into one global reply. Remark: no direct relation to PostableResource.handle()

Parameters:
request - The HTTP request
 o byteArrayNEquals
 public static final boolean byteArrayNEquals(byte ba1[],
                                              int off1,
                                              byte ba2[],
                                              int off2,
                                              int n)
Analogous to standard C's strncmp, for byte arrays. (Should be in some utility package, I'll put it here for now)

Parameters:
ba1 - the first byte array
off1 - where to start in the first array
ba2 - the second byte array
off2 - where to start in the second array
n - the length to compare up to
Returns:
true if both specified parts of the arrays are equal, false if they aren't .
 o getLastModified
 public long getLastModified()
Get this resource last modification time.

Overrides:
getLastModified in class HTTPResource
 o createDefaultReply
 public final Reply createDefaultReply(Request request,
                                       int status)
Create a reply to answer to request on this file.

Overrides:
createDefaultReply in class FileResource
 o createCommandReply
 public final Reply createCommandReply(Request request,
                                       int status)

All Packages  Class Hierarchy  This Package  Previous  Next  Index