Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.ssi
Class SSIProcessor

    java.lang.Object
      org.apache.catalina.ssi.SSIProcessor

public class SSIProcessor
extends java.lang.Object

The entry point to SSI processing. This class does the actual parsing, delegating to the SSIMediator, SSICommand, and SSIExternalResolver as necessary[

Version:
  $Revision: 1.2 $, $Date: 2003/09/02 21:22:01 $
Author:
  Dan Sandberg

Field Summary
`protected static int` | `BUFFER_SIZE`
`protected static java.lang.String` | `COMMAND_END` The end pattern
`protected static java.lang.String` | `COMMAND_START` The start pattern
`protected java.util.HashMap` | `commands`
`protected int` | `debug`
`protected SSIExternalResolver` | `ssiExternalResolver`

Constructor Summary
`SSIProcessor(SSIExternalResolver ssiExternalResolver, int debug)`

Method Summary
`protected void` | `addBuiltinCommands()`
`void` | `addCommand(java.lang.String name, SSICommand command)`
`protected boolean` | `charCmp(java.lang.String buf, int index, java.lang.String command)`
`protected boolean` | `isSpace(char c)`
`protected java.lang.String[]` | `parseParamNames(java.lang.StringBuffer cmd, int start)` Parse a StringBuffer and take out the param type token.
`protected java.lang.String[]` | `parseParamValues(java.lang.StringBuffer cmd, int start)` Parse a StringBuffer and take out the param token.
`void` | `process(java.io.Reader reader, java.util.Date lastModifiedDate, java.io.PrintWriter writer)` Process a file with server-side commands, reading from reader and writing the processed version to writer.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### COMMAND_START

    protected static final java.lang.String COMMAND_START

  The start pattern

  See Also:
    Constant Field Values

### COMMAND_END

    protected static final java.lang.String COMMAND_END

  The end pattern

  See Also:
    Constant Field Values

### BUFFER_SIZE

    protected static final int BUFFER_SIZE

See Also:
  Constant Field Values

### ssiExternalResolver

    protected SSIExternalResolver ssiExternalResolver

### commands

    protected java.util.HashMap commands

### debug

    protected int debug

Constructor Detail

### SSIProcessor

    public SSIProcessor(SSIExternalResolver ssiExternalResolver,
                        int debug)

Method Detail

### addBuiltinCommands

    protected void addBuiltinCommands()

### addCommand

    public void addCommand(java.lang.String name,
                           SSICommand command)

### process

    public void process(java.io.Reader reader,
                        java.util.Date lastModifiedDate,
                        java.io.PrintWriter writer)
                 throws java.io.IOException

  Process a file with server-side commands, reading from reader and writing the processed version to writer. NOTE: We really should be doing this in a streaming way rather than converting it to an array first.

  Parameters:
    `reader` - the reader to read the file containing SSIs from
    `writer` - the writer to write the file with the SSIs processed.
  Throws:
    `java.io.IOException` - when things go horribly awry. Should be unlikely since the SSICommand usually catches 'normal' IOExceptions.

### parseParamNames

    protected java.lang.String[] parseParamNames(java.lang.StringBuffer cmd,
                                                 int start)

  Parse a StringBuffer and take out the param type token. Called from `requestHandler`

  Parameters:
    `cmd` - a value of type 'StringBuffer'
  Returns:
    a value of type 'String[]'

### parseParamValues

    protected java.lang.String[] parseParamValues(java.lang.StringBuffer cmd,
                                                  int start)

  Parse a StringBuffer and take out the param token. Called from `requestHandler`

  Parameters:
    `cmd` - a value of type 'StringBuffer'
  Returns:
    a value of type 'String[]'

### charCmp

    protected boolean charCmp(java.lang.String buf,
                              int index,
                              java.lang.String command)

### isSpace

    protected boolean isSpace(char c)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.