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

Variable Index

 o bodySegs
 o classloader
 o classSegs
 o extendsSegs
 o implementsSegs
 o importSegs

Constructor Index

 o PageCompileFrame()

Method Index

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

Variables

 o classloader
 protected static GeneratedClassLoader classloader
 o classSegs
 protected Segment classSegs[]
 o importSegs
 protected Segment importSegs[]
 o extendsSegs
 protected Segment extendsSegs[]
 o implementsSegs
 protected Segment implementsSegs[]
 o bodySegs
 protected Segment bodySegs[]

Constructors

 o PageCompileFrame
 public PageCompileFrame()

Methods

 o getClassLoader
 protected static GeneratedClassLoader getClassLoader()
 o createClassLoader
 protected static void createClassLoader(File dir)
 o getNewClassLoader
 protected static GeneratedClassLoader getNewClassLoader()
 o getPageCompileProps
 protected PageCompileProp getPageCompileProps()
 o getGeneratedClassName
 protected String getGeneratedClassName()
 o getGeneratedPackageName
 protected String getGeneratedPackageName()
 o getPackagedClassName
 protected String getPackagedClassName()
 o getGeneratedClassFile
 protected File getGeneratedClassFile()
 o classCompiled
 protected boolean classCompiled()
 o getCompiler
 protected PageCompiler getCompiler()
 o 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
 o readUnparsed
 protected byte[] readUnparsed() throws IOException
 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 parseType
 protected int parseType(byte unparsed[],
                         int startParam,
                         int endParam)
 o parse
 protected Segment[] parse()
 o separateSegments
 protected void separateSegments(Segment segments[])
 o getPackageStatement
 protected byte[] getPackageStatement()
 o getImportStatements
 protected byte[] getImportStatements()
 o getClassDeclarationStatement
 protected byte[] getClassDeclarationStatement()
 o getGetMethodDeclaration
 protected byte[] getGetMethodDeclaration()
 o getClassEnd
 protected byte[] getClassEnd()
 o getSegmentBytes
 protected byte[] getSegmentBytes(Segment seg)
 o 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
 o registerNewGeneratedFrame
 protected void registerNewGeneratedFrame(Request request) throws ResourceException, ProtocolException
 o checkContent
 protected void checkContent(Request request) throws ResourceException, ProtocolException
 o 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