Interface ServletEngineAdapter

All Superinterfaces:
UPRequestHandler

public interface ServletEngineAdapter extends UPRequestHandler
This interface abstracts away the details of starting up and shutting down a servlet engine, as well as adapting between the concrete classes that implement the Java Servlet API and the Prometheus Untrusted Process API.
  • Method Details

    • start

      void start(String serverInfo, ServletEngineAdapter.Config runtimeOptions)
      Performs whatever setup is necessary for this servlet container. This method waits for setup to complete before returning.
      Parameters:
      serverInfo - The string that should be returned by ServletContext.getServerInfo().
      runtimeOptions - Extra options, currently used for the Jetty HTTP adapter only.
    • stop

      void stop()
      Perform any shutdown procedures necessary for this servlet container. This method should return once the shutdown has been completed.
    • addAppVersion

      void addAppVersion(AppVersion appVersion) throws FileNotFoundException
      Register the specified application version for future calls to serviceRequest.
      Throws:
      FileNotFoundException - If any of the specified files could not be located.
    • deleteAppVersion

      void deleteAppVersion(AppVersion appVersion)
      Remove the specified application version and free up any resources associated with it.
    • setSessionStoreFactory

      void setSessionStoreFactory(SessionStoreFactory factory)
      Sets the SessionStoreFactory that will be used to create the list of SessionStores to which the HTTP Session will be stored, if sessions are enabled. This method must be invoked after start(java.lang.String, com.google.apphosting.runtime.ServletEngineAdapter.Config).