    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.jigsaw.pagecompile.PageCompileFrame

    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.pagecompile.PageCompileFrame

public class PageCompileFrame
extends HTTPFrame

##

bodySegs
classloader
classSegs
extendsSegs
implementsSegs
importSegs

##

PageCompileFrame()

##

byteArrayNEquals(byte[], int, byte[], int, int)
  Analogous to standard C's `strncmp`, for byte arrays.
checkContent(Request)
classCompiled()
createClassLoader(File)
generateFrame(Request)
  Generate the frame.
getClassDeclarationStatement()
getClassEnd()
getClassLoader()
getCompiler()
getGeneratedClassFile()
getGeneratedClassName()
getGeneratedPackageName()
getGetMethodDeclaration()
getImportStatements()
getNewClassLoader()
getPackagedClassName()
getPackageStatement()
getPageCompileProps()
getSegmentBytes(Segment)
parse()
parseType(byte[], int, int)
perform(RequestInterface)
  Makes sure that checkContent() is called on _any_ HTTP method, so that the internal representation of commands is always consistent.
readUnparsed()
registerNewGeneratedFrame(Request)
registerResource(FramedResource)
  Register the resource and add Properties in httpd.
separateSegments(Segment[])

##

classloader

     protected static GeneratedClassLoader classloader

classSegs

     protected Segment classSegs[]

importSegs

     protected Segment importSegs[]

extendsSegs

     protected Segment extendsSegs[]

implementsSegs

     protected Segment implementsSegs[]

bodySegs

     protected Segment bodySegs[]

##

PageCompileFrame

     public PageCompileFrame()

##

getClassLoader

     protected static GeneratedClassLoader getClassLoader()

createClassLoader

     protected static void createClassLoader(File dir)

getNewClassLoader

     protected static GeneratedClassLoader getNewClassLoader()

getPageCompileProps

     protected PageCompileProp getPageCompileProps()

getGeneratedClassName

     protected String getGeneratedClassName()

getGeneratedPackageName

     protected String getGeneratedPackageName()

getPackagedClassName

     protected String getPackagedClassName()

getGeneratedClassFile

     protected File getGeneratedClassFile()

classCompiled

     protected boolean classCompiled()

getCompiler

     protected PageCompiler getCompiler()

registerResource

     public void registerResource(FramedResource resource)

  Register the resource and add Properties in httpd.

  Parameters:
    resource - The resource to register.
  Overrides:
    registerResource in class HTTPFrame

readUnparsed

     protected byte[] readUnparsed() throws IOException

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 .

parseType

     protected int parseType(byte unparsed[],
                             int startParam,
                             int endParam)

parse

     protected Segment[] parse()

separateSegments

     protected void separateSegments(Segment segments[])

getPackageStatement

     protected byte[] getPackageStatement()

getImportStatements

     protected byte[] getImportStatements()

getClassDeclarationStatement

     protected byte[] getClassDeclarationStatement()

getGetMethodDeclaration

     protected byte[] getGetMethodDeclaration()

getClassEnd

     protected byte[] getClassEnd()

getSegmentBytes

     protected byte[] getSegmentBytes(Segment seg)

generateFrame

     public GeneratedFrame generateFrame(Request request) throws ResourceException, ProtocolException

  Generate the frame.

  Parameters:
    request - the incomming request.
  Throws: ResourceException
    if a fatal error occurs.
  Throws: ProtocolException
    if compilation failed

registerNewGeneratedFrame

     protected void registerNewGeneratedFrame(Request request) throws ResourceException, ProtocolException

checkContent

     protected void checkContent(Request request) throws ResourceException, ProtocolException

perform

     public ReplyInterface perform(RequestInterface request) throws ProtocolException, ResourceException

  Makes sure that checkContent() is called on _any_ HTTP method, so that the internal representation of commands is always consistent.

  Parameters:
    request - The HTTPRequest
  Returns:
    a ReplyInterface instance
  Throws: ProtocolException
    If processing the request failed.
  Throws: ResourceException
    If this resource got a fatal error.
  Overrides:
    perform in class HTTPFrame

    All Packages  Class Hierarchy  This Package  Previous  Next  Index