Class DynamicFileServer

java.lang.Object
com.pixelservices.flash.components.fileserver.DynamicFileServer

public class DynamicFileServer extends Object
Serves dynamic files from either the filesystem or a resource stream. Supports single-page applications with an entrypoint fallback.
  • Constructor Details

    • DynamicFileServer

      public DynamicFileServer(FlashServer server)
      Constructs the dynamic file server.
      Parameters:
      server - the server to register routes to
  • Method Details

    • serve

      public void serve(String endpoint, DynamicFileServerConfiguration config, Class<?> contextClass)
      Serves files dynamically from a filesystem path or a resource folder.
      Parameters:
      endpoint - the base URL endpoint
      config - the configuration object
      contextClass - optional class used for loading resources (for RESOURCESTREAM)