Server component properties
Class com.gp.api.jsp.MxServerProperties contains
properties of a server component. You can create a new instance of this class by using
one of the following methods:
- public static MxServerProperties newInstance()
- Returns a new MxServerProperties instance initialized to the default values.
- public static MxServerProperties read(String fname)
- Returns a new MxServerProperties instance initialized from the file. To
store a modified version of the instance you can use
public void writeTo(String fname).
- public static MxServerProperties read()
- Returns a new MxServerProperties instance initialized from resource or file "webcharts3D.xml".
The function looks for the resource first and if the resource is not found, then
attempts to load file with the same name located in the same folder as the jar file.
After an instance of MxServerProperties is created you can modify the following fields:
- public String image
- Defines default image type.
Default: "PNG"
- public MxServerProperties.Cache cache
- Defines cache type. There are only two cache types - Cache.MEMORY and Cache.FILE.
Default: Cache.MEMORY
- public long minTimeout
- How long to keep images in memory (in msecs) after the reference count falls to zero.
Default: 5000
- public long maxTimeout
- How long to keep images with positive reference count in memory (in msecs) if nobody is accessing it.
Default: 30000
- public int cacheSize
-
Maximum number of images that can be kept in cache at the same time. When the value of this variable is
set to zero the cache becomes disabled. To allow any number of the images set this variable to -1. When
the size is positive the least recently used image will be removed from the cache if the cache is full.
Default: 100
- public boolean throwException
-
Specifies exception handling policy - when set to false all exceptions thrown during
image production are caught and an image with the exception trace is returned to the
end user.
Default: true
- public int maxThreads
-
The maximum number of the simultaneously produced images. The value of 0 will make the
engine fully synchronized. A positive value will allow the engine to process
more than one request at a time. Since every concurrently produced image
requires allocation of the resources for its production, setting this parameter to
large values can slow down your system.
Default: 20
- public long gcInterval
-
WebCharts3D garbage collection minimum interval. When gc() method is called more than once during
this interval, it will immediatelly return. Note that this is not Java VM garbage collection -
this method removes expired images from the image cache and frees some other resources locked by
the system.
Default: 3000
- public MxServerProperties.Compression compression
-
Some of the formats produced by WebCharts3D can use compressed data. Compression
field tells the engine what type of compression should be used when producing
images. Currently only two values are defined: Compression.DEFAULT and Compression.UNCOMPRESSED.
Default: Compression.DEFAULT
- public boolean useBuiltinXmlParser
-
When set to true, a built-in, non-validating parser is used, otherwise a class defined in
xmlParser is loaded. Note that using validating parsers might decrease the system performance.
Default: true
- public String xmlParser
-
Defines xml parser to use when useBuiltInParser is set to false
Default: org.apache.xerces.parsers.SAXParser
- public String license
-
Server license to be used for chart production.
Default: null
- public IcVDTable folders
-
Contains information about server's virtual directories. Currently only one entry in this
table is used - Images that defines a directory to store images when Cache.File cache type
is used.
Example: folders.define("Images","C:\\Temp");
- public IcMimeTable mime
-
Maps image types to the mime types.
Example: mime.define("application/x-shockwave-flash=.swf");
- public IcFMTable fontMap
-
Font map table - defines additional font mappings.
Example: fontMap.define("monospased", "Courier New");
- public boolean useFlashFonts
-
Tells the server to use Macromedia Flash fonts located in the folder defined by
"Fonts" entry in the folders table. This flag provided for backward compatibility and
generally should not be modified.