    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.jigsaw.ssi.SSIFrame

    java.lang.Object
       |
       +----org.w3c.tools.resources.AttributeHolder
               |
               +----org.w3c.tools.resources.Resource
                       |
                       +----org.w3c.tools.resources.FramedResource
                               |
                               +----org.w3c.tools.resources.ResourceFrame
                                       |
                                       +----org.w3c.tools.resources.ProtocolFrame
                                               |
                                               +----org.w3c.jigsaw.frames.HTTPFrame
                                                       |
                                                       +----org.w3c.jigsaw.ssi.SSIFrame

public class SSIFrame
extends HTTPFrame

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 `org.w3c.jigsaw.ssi.CommandRegistry`.

See Also:
  CommandRegistry, Command

##

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

##

SSIFrame()

##

attributeChanged(AttributeChangedEvent)
  Listen its resource.
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.
getFileResource(Request)
getLastModified()
  Get this resource last modification time.
handle(Request)
  Handles all relevant HTTP methods.
perform(RequestInterface)
  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.

##

debug

     public static final boolean debug

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

##

SSIFrame

     public SSIFrame()

##

attributeChanged

     public void attributeChanged(AttributeChangedEvent evt)

  Listen its resource.

  Overrides:
    attributeChanged in class HTTPFrame

perform

     public ReplyInterface perform(RequestInterface request) throws ProtocolException, NotAProtocolException

  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 HTTPFrame

getFileResource

     protected Reply getFileResource(Request request) throws ProtocolException, NotAProtocolException

  Overrides:
    getFileResource in class HTTPFrame

post

     public Reply post(Request request) throws ProtocolException, NotAProtocolException

  The default POST method replies with a not implemented.

  Overrides:
    post in class HTTPFrame

handle

     public Reply handle(Request request) throws ProtocolException

  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 Resource

createDefaultReply

     public final Reply createDefaultReply(Request request,
                                           int status)

  Create a reply to answer to request on this file.

  Overrides:
    createDefaultReply in class HTTPFrame

createCommandReply

     public final Reply createCommandReply(Request request,
                                           int status)

    All Packages  Class Hierarchy  This Package  Previous  Next  Index