public abstract class TextConfig
extends Object
Modifier and Type | Field and Description |
---|---|
boolean |
allowBrowserCaching
Whether to allow browsers to cache XTF pages.
|
AttribList |
attribs
All the configuration attributes in the form of name/value pairs
|
boolean |
dependencyCheckingEnabled
Turns on dependency checking for the caches, so that (for instance)
changing a stylesheet forces it to be reloaded.
|
String |
errorGenSheet
Filesystem path to a stylesheet used to generate error pages
(no permission, invalid document, general exceptions, etc.)
|
int |
indexWarmingUpdateInterval
Interval for index warming.
|
int |
latencyCutoffSize
Enables a cutoff size for latency reporting (if
reportLatency
is true.) |
String |
logLevel
Logging level: "silent", "errors", "warnings", "info", or "debug"
|
boolean |
reportLatency
Turns on latency reporting for the servlet.
|
long |
runawayKillTime
Amount of time (in seconds) after which a request should
voluntarily kill itself.
|
long |
runawayNormalTime
Amount of time (in seconds) that a request is allowed to run
before we consider it a possible "runaway" and start logging warning
messages.
|
TextServlet |
servlet
Servlet we are part of
|
Pattern |
sessionEncodeURLPattern
Which URLs to apply encoding to, if session tracking enabled and
user doesn't allow cookies.
|
int |
stylesheetCacheExpire
Max length of time (in seconds) to cache a stylesheet.
|
int |
stylesheetCacheSize
Max # of stylesheets to cache
|
boolean |
stylesheetProfiling
Whether to print out a stylesheet profile after each request
|
private String |
tokenizeParam |
Map |
tokenizerMap
List of parameters to tokenize specially.
|
private String |
tokenizeTokenizer |
boolean |
trackSessions
Whether session tracking is enabled.
|
Constructor and Description |
---|
TextConfig(TextServlet servlet)
Create a configuration and attach it to a servlet
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
handleProperty(String tagAttr,
String strVal)
Called when a property is encountered.
|
static boolean |
parseBoolean(String tagAttr,
String strVal)
Utility function - parse a boolean value.
|
static int |
parseInt(String tagAttr,
String strVal)
Utility function - parse an integer value.
|
void |
read(String expectedRootTag,
String path)
Constructor - Reads and parses the global configuration file (XML) for
the servlet.
|
static void |
requireOrElse(String value,
String descrip)
Utility function - if the value is empty, throws an exception.
|
public TextServlet servlet
public String logLevel
public int stylesheetCacheSize
public int stylesheetCacheExpire
public String errorGenSheet
public boolean dependencyCheckingEnabled
public boolean reportLatency
public int latencyCutoffSize
reportLatency
is true.) Specifies the number of bytes after which a latency message
will be printed, even if the output is not complete.public long runawayNormalTime
public long runawayKillTime
public boolean trackSessions
public Pattern sessionEncodeURLPattern
public boolean stylesheetProfiling
public boolean allowBrowserCaching
public Map tokenizerMap
public int indexWarmingUpdateInterval
public AttribList attribs
private String tokenizeParam
private String tokenizeTokenizer
public TextConfig(TextServlet servlet)
public void read(String expectedRootTag, String path) throws GeneralException
path
- Filesystem path to the config file.GeneralException
protected boolean handleProperty(String tagAttr, String strVal)
tagAttr
- Combined element/attribute name being consideredstrVal
- It's string valuepublic static int parseInt(String tagAttr, String strVal) throws GeneralException
tagAttr
- Name of the element/attribute being consideredstrVal
- It's string valueGeneralException
public static boolean parseBoolean(String tagAttr, String strVal) throws GeneralException
tagAttr
- Name of the element/attribute being consideredstrVal
- It's string valueGeneralException
public static void requireOrElse(String value, String descrip) throws GeneralException
value
- Value to check for null or ""descrip
- If thrown, the exception uses this as the message.GeneralException