public abstract class IlvSVGManagerServletSupport extends Object
Constructor and Description |
---|
IlvSVGManagerServletSupport(SVGDocumentBuilderConfigurator configurator,
jakarta.servlet.ServletContext context)
Creates a manager servlet support.
|
Modifier and Type | Method and Description |
---|---|
protected Document |
generateSVGDocument(jakarta.servlet.http.HttpServletRequest request,
int width,
int height,
String[] requestedLayers)
Generates the image.
|
boolean |
getContentLengthEnable()
Returns
true if the servlet support is buffered. |
protected jakarta.servlet.ServletContext |
getContext()
Returns the
ServletContext in which this
IlvSVGManagerServletSupport runs. |
protected IlvManagerLayer[] |
getLayers(jakarta.servlet.http.HttpServletRequest request,
IlvManager manager)
Returns the list of layers that are allowed to be rendered.
|
protected Object |
getLock(jakarta.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(jakarta.servlet.http.HttpServletRequest request)
Returns the
IlvManager used for the specified request. |
boolean |
handleRequest(jakarta.servlet.http.HttpServletRequest request,
jakarta.servlet.http.HttpServletResponse response)
Responds to HTTP requests.
|
boolean |
isVerbose()
Returns
true if the servlet is in verbose mode. |
protected void |
prepareManager(jakarta.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, jakarta.servlet.ServletContext context)
configurator
- The configurator that will be used to generate SVG.context
- The Servlet context.protected final jakarta.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(jakarta.servlet.http.HttpServletRequest request) throws jakarta.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.jakarta.servlet.ServletException
protected IlvManagerLayer[] getLayers(jakarta.servlet.http.HttpServletRequest request, IlvManager manager) throws jakarta.servlet.ServletException
request
- The current HTTP request.manager
- The manager (returned by getManager
).jakarta.servlet.ServletException
protected Object getLock(jakarta.servlet.http.HttpServletRequest request)
request
- The current HTTP request.getManager(jakarta.servlet.http.HttpServletRequest)
protected Document generateSVGDocument(jakarta.servlet.http.HttpServletRequest request, int width, int height, String[] requestedLayers) throws jakarta.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.jakarta.servlet.ServletException
protected void prepareManager(jakarta.servlet.http.HttpServletRequest request, IlvManager manager) throws jakarta.servlet.ServletException
request
- The current HTTP request.manager
- The manager returned by getManager
.jakarta.servlet.ServletException
public boolean handleRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
false
if the request is not a request
recognized by this servlet.request
- The current HTTP request.response
- The HTTP response.IOException
jakarta.servlet.ServletException
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.