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

abstract class TileServlet extends GenericServlet
A servlet to display Quad-tree tiles.
Since:
5.0
Version:
11.5
Author:
Luke
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    A class to store Tile Addresses including type name and date.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected byte[]
     

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getTileAddress(String uri, boolean getDate)
    Parses a URI to get the five-dimensional tile address.
    void
    Initializes the servlet and loads an empty tile buffer.
    protected static void
    writeTile(jakarta.servlet.http.HttpServletResponse rsp, byte[] data)
    Helper method to dump the tile data to the output stream.

    Methods inherited from class GenericServlet

    getURL

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doGet, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, service

    Methods inherited from class jakarta.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      init in class jakarta.servlet.GenericServlet
    • getTileAddress

      protected TileServlet.TileAddress5D getTileAddress(String uri, boolean getDate)
      Parses a URI to get the five-dimensional tile address.
      Parameters:
      uri - the URI
      getDate - 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 HttpServletResponse
      data - the tile image data