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
-
STATE_DEPTH
- Message state - the current recursion depth
-
STATE_VARIABLES
- Message state - the current variables
-
vars
- Our "very global" variables
-
SSIResource()
-
-
byteArrayNEquals(byte[], int, byte[], int, int)
- Analogous to standard C's
strncmp
, for byte arrays.
-
createCommandReply(Request, int)
-
-
createDefaultReply(Request, int)
- Create a reply to answer to request on this file.
-
get(Request)
- The GET method on files.
-
getLastModified()
- Get this resource last modification time.
-
handle(Request)
- Handles all relevant HTTP methods.
-
perform(Request)
- Makes sure that checkContent() is called on _any_ HTTP method,
so that the internal representation of commands is always consistent.
-
post(Request)
- The default POST method replies with a not implemented.
-
updateFileAttributes()
- Updates the attributes and instance variables that depend
on the file.
vars
protected Dictionary vars
- Our "very global" variables
STATE_DEPTH
public static final String STATE_DEPTH
- Message state - the current recursion depth
STATE_VARIABLES
public static final String STATE_VARIABLES
- Message state - the current variables
SSIResource
public SSIResource()
updateFileAttributes
public void updateFileAttributes()
- Updates the attributes and instance variables that depend
on the file.
- Overrides:
- updateFileAttributes in class FileResource
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
get
public Reply get(Request request) throws HTTPException
- The GET method on files.
- Overrides:
- get in class FileResource
post
public Reply post(Request request) throws HTTPException, ClientException
- The default POST method replies with a not implemented.
- Overrides:
- post in class HTTPResource
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
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 .
getLastModified
public long getLastModified()
- Get this resource last modification time.
- Overrides:
- getLastModified in class HTTPResource
createDefaultReply
public final Reply createDefaultReply(Request request,
int status)
- Create a reply to answer to request on this file.
- Overrides:
- createDefaultReply in class FileResource
createCommandReply
public final Reply createCommandReply(Request request,
int status)
All Packages Class Hierarchy This Package Previous Next Index