public abstract class IlvSVGManagerServletSupport extends Object
Constructor and Description |
---|
IlvSVGManagerServletSupport(SVGDocumentBuilderConfigurator configurator,
javax.servlet.ServletContext context)
Creates a manager servlet support.
|
Modifier and Type | Method and Description |
---|---|
protected Document |
generateSVGDocument(javax.servlet.http.HttpServletRequest request,
int width,
int height,
String[] requestedLayers)
Generates the image.
|
boolean |
getContentLengthEnable()
Returns
true if the servlet support is buffered. |
protected javax.servlet.ServletContext |
getContext()
Returns the
ServletContext in which this
IlvSVGManagerServletSupport runs. |
protected IlvManagerLayer[] |
getLayers(javax.servlet.http.HttpServletRequest request,
IlvManager manager)
Returns the list of layers that are allowed to be rendered.
|
protected Object |
getLock(javax.servlet.http.HttpServletRequest request)
Returns a locking object that is used to lock the contents of the manager
while it is being rendered.
|
abstract IlvManager |
getManager(javax.servlet.http.HttpServletRequest request)
Returns the
IlvManager used for the specified request. |
boolean |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Responds to HTTP requests.
|
boolean |
isVerbose()
Returns
true if the servlet is in verbose mode. |
protected void |
prepareManager(javax.servlet.http.HttpServletRequest request,
IlvManager manager)
Allows you to prepare the manager view content before the image is
generated or the capabilities are computed.
|
void |
setContentLengthEnable(boolean value)
Sets the flag that switches the servlet support in a buffered mode.
|
void |
setVerbose(boolean value)
Turns the verbose mode on and off.
|
public IlvSVGManagerServletSupport(SVGDocumentBuilderConfigurator configurator, javax.servlet.ServletContext context)
configurator
- The configurator that will be used to generate SVG.context
- The Servlet context.protected final javax.servlet.ServletContext getContext()
ServletContext
in which this
IlvSVGManagerServletSupport
runs.public final void setVerbose(boolean value)
value
- The new value for verbose.isVerbose()
public final boolean isVerbose()
true
if the servlet is in verbose mode.setVerbose(boolean)
public final void setContentLengthEnable(boolean value)
value
- The buffered flag.getContentLengthEnable()
public final boolean getContentLengthEnable()
true
if the servlet support is buffered. The default
value is false
.setContentLengthEnable(boolean)
public abstract IlvManager getManager(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
IlvManager
used for the specified request.
You can return the same manager every time, or return a manager for each
request session if the content of the manager depends on the session.request
- The current HTTP request.javax.servlet.ServletException
protected IlvManagerLayer[] getLayers(javax.servlet.http.HttpServletRequest request, IlvManager manager) throws javax.servlet.ServletException
request
- The current HTTP request.manager
- The manager (returned by getManager
).javax.servlet.ServletException
protected Object getLock(javax.servlet.http.HttpServletRequest request)
request
- The current HTTP request.getManager(javax.servlet.http.HttpServletRequest)
protected Document generateSVGDocument(javax.servlet.http.HttpServletRequest request, int width, int height, String[] requestedLayers) throws javax.servlet.ServletException
request
- The current HTTP request.width
- The width of the image.height
- The height of the image.requestedLayers
- An array of layer names to draw, the array may be empty if all
layers have to be drawn.javax.servlet.ServletException
protected void prepareManager(javax.servlet.http.HttpServletRequest request, IlvManager manager) throws javax.servlet.ServletException
request
- The current HTTP request.manager
- The manager returned by getManager
.javax.servlet.ServletException
public boolean handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
false
if the request is not a request
recognized by this servlet.request
- The current HTTP request.response
- The HTTP response.IOException
javax.servlet.ServletException
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.