public class SSIProcessor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowExec |
protected static java.lang.String |
COMMAND_END
The end pattern
|
protected static java.lang.String |
COMMAND_START
The start pattern
|
protected java.util.HashMap<java.lang.String,SSICommand> |
commands |
protected int |
debug |
protected SSIExternalResolver |
ssiExternalResolver |
Constructor and Description |
---|
SSIProcessor(SSIExternalResolver ssiExternalResolver,
int debug,
boolean allowExec) |
Modifier and Type | Method and Description |
---|---|
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 |
isQuote(char c) |
protected boolean |
isSpace(char c) |
protected java.lang.String[] |
parseParamNames(java.lang.StringBuilder cmd,
int start)
Parse a StringBuilder and take out the param type token.
|
protected java.lang.String[] |
parseParamValues(java.lang.StringBuilder cmd,
int start,
int count)
Parse a StringBuilder and take out the param token.
|
long |
process(java.io.Reader reader,
long lastModifiedDate,
java.io.PrintWriter writer)
Process a file with server-side commands, reading from reader and
writing the processed version to writer.
|
protected static final java.lang.String COMMAND_START
protected static final java.lang.String COMMAND_END
protected final SSIExternalResolver ssiExternalResolver
protected final java.util.HashMap<java.lang.String,SSICommand> commands
protected final int debug
protected final boolean allowExec
public SSIProcessor(SSIExternalResolver ssiExternalResolver, int debug, boolean allowExec)
protected void addBuiltinCommands()
public void addCommand(java.lang.String name, SSICommand command)
public long process(java.io.Reader reader, long lastModifiedDate, java.io.PrintWriter writer) throws java.io.IOException
reader
- the reader to read the file containing SSIs fromwriter
- the writer to write the file with the SSIs processed.java.io.IOException
- when things go horribly awry. Should be unlikely since the
SSICommand usually catches 'normal' IOExceptions.protected java.lang.String[] parseParamNames(java.lang.StringBuilder cmd, int start)
requestHandler
cmd
- a value of type 'StringBuilder'protected java.lang.String[] parseParamValues(java.lang.StringBuilder cmd, int start, int count)
requestHandler
cmd
- a value of type 'StringBuilder'protected boolean charCmp(java.lang.String buf, int index, java.lang.String command)
protected boolean isSpace(char c)
protected boolean isQuote(char c)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.