Class TileServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.deltava.servlet.GenericServlet
org.deltava.servlet.TileServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
- Direct Known Subclasses:
CustomTileServlet, TrackTileServlet, WeatherTileServlet
A servlet to display Quad-tree tiles.
- Since:
- 5.0
- Version:
- 11.5
- Author:
- Luke
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classA class to store Tile Addresses including type name and date.Nested classes/interfaces inherited from class GenericServlet
GenericServlet.ForbiddenException, GenericServlet.NotFoundException, GenericServlet.ServletSecurityContext -
Field Summary
FieldsFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TileServlet.TileAddress5DgetTileAddress(String uri, boolean getDate) Parses a URI to get the five-dimensional tile address.voidinit()Initializes the servlet and loads an empty tile buffer.protected static voidwriteTile(jakarta.servlet.http.HttpServletResponse rsp, byte[] data) Helper method to dump the tile data to the output stream.Methods inherited from class GenericServlet
getURLMethods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Field Details
-
EMPTY
protected byte[] EMPTY
-
-
Constructor Details
-
TileServlet
TileServlet()
-
-
Method Details
-
init
public void init()Initializes the servlet and loads an empty tile buffer.- Overrides:
initin classjakarta.servlet.GenericServlet
-
getTileAddress
Parses a URI to get the five-dimensional tile address.- Parameters:
uri- the URIgetDate- TRUE if a data should be fetched, otherwise use current Date- Returns:
- a TileAddress5D
-
writeTile
protected static void writeTile(jakarta.servlet.http.HttpServletResponse rsp, byte[] data) Helper method to dump the tile data to the output stream.- Parameters:
rsp- the HttpServletResponsedata- the tile image data
-