Interface IHttpServer<T extends ModuleConfig>

Type Parameters:
T - Type of module configuration
All Superinterfaces:
IEventProducer, IModule<T>, IModuleBase<T>

public interface IHttpServer<T extends ModuleConfig> extends IModule<T>

Base interface for HTTP server implementations

Since:
Apr 21, 2021
  • Method Details

    • deployServlet

      void deployServlet(javax.servlet.http.HttpServlet servlet, String path)
    • deployServlet

      void deployServlet(javax.servlet.http.HttpServlet servlet, Map<String,String> initParams, String... paths)
    • undeployServlet

      void undeployServlet(javax.servlet.http.HttpServlet servlet)
    • addServletSecurity

      void addServletSecurity(String pathSpec, boolean requireAuth)
    • addServletSecurity

      void addServletSecurity(String pathSpec, boolean requireAuth, String... roles)
    • getServerBaseUrl

      String getServerBaseUrl()
      Returns:
      The base URL under which this server is exposed to consumers (i.e it will start with the proxy URL if configured)
    • getServletsBaseUrl

      String getServletsBaseUrl()
      Returns:
      The base URL under which web services and APIs are exposed by this server
    • getPublicEndpointUrl

      String getPublicEndpointUrl(String path)
      Parameters:
      path - desired URL path
      Returns:
      The full endpoint URL allowing access to the given URL path
    • isAuthEnabled

      boolean isAuthEnabled()
      Check if authentication is enabled on the HTTP server
      Returns:
      true if at least one authentication method is enabled, false otherwise