Class MapPage

java.lang.Object
org.ka2ddo.yaac.webserver.PathHandler
org.ka2ddo.yaac.webserver.MapPage

public class MapPage extends PathHandler
This class dynamically generates a PNG image of the current map as seen on the YAAC GUI. Note that this code is currently dependent on the AWT/Swing GUI implementation of images, so the webserver can't be used on a headless JVM.
Author:
Andrew Pavlin, KA2DDO
  • Constructor Details

    • MapPage

      public MapPage()
  • Method Details

    • processPage

      public String processPage(HttpConnectionThread hct, LinkedHashMap<String,String> requestHeaders, DataInput in, OutputStream out, String path) throws IOException
      Given an inbound HTTP request, generate a page using its parameters.
      Specified by:
      processPage in class PathHandler
      Parameters:
      hct - HttpConnectionThread issuing the call
      requestHeaders - the HTTP request headers the browser sent
      in - DataInput for reading the body of the HTTP request
      out - OutputStream to write the generated page to
      path - the remainder of the URL following the prefix identifying this particular page, in case the user is providing parameters to the page
      Returns:
      the Content-Type header value to return to tell the remote browser how to interpret the page
      Throws:
      IOException - if the page could not be generated for some reason