Class BaseAdminHttpApplication

java.lang.Object
org.forgerock.openig.http.BaseAdminHttpApplication
All Implemented Interfaces:
DescribedHttpApplication, HttpApplication, AdminHttpApplication

public class BaseAdminHttpApplication extends Object implements AdminHttpApplication
Configuration class for the Identity Gateway Administration.
  • Field Details

    • ADMIN_TRACING_PROVIDER

      public static final String ADMIN_TRACING_PROVIDER
      The name used for the admin endpoints.
      See Also:
  • Constructor Details

    • BaseAdminHttpApplication

      public BaseAdminHttpApplication(String adminPrefix, JsonValue config, Environment environment, boolean serveDeprecatedPrometheusEndpoint, org.forgerock.config.resolvers.PropertyResolver propertyResolver, org.forgerock.monitoring.api.instrument.MeterRegistry meterRegistry, StartupMetrics parentStartupMetrics, HttpClientProvider httpClientProvider, WebSocketClientProvider webSocketClientProvider, Clock clock, IgTicker ticker, ProductInfo productInfo, org.forgerock.openig.tracing.OpenTelemetryService openTelemetryService, SystemHealth systemHealth) throws IOException, HttpApplicationException
      Construct a BaseAdminHttpApplication.
      Parameters:
      adminPrefix - the prefix to use in the URL to access the admin endpoints
      config - the admin configuration
      environment - the IG environment
      serveDeprecatedPrometheusEndpoint - set to true to enable the deprecated Prometheus endpoint
      propertyResolver - root property resolver
      meterRegistry - the meter registry
      parentStartupMetrics - the parent StartupMetrics
      httpClientProvider - The provider of HttpClient
      webSocketClientProvider - The WebSocket Client Provider
      clock - The clock to use
      ticker - The ticker to use
      productInfo - The product information
      openTelemetryService - The OpenTelemetryService instance
      systemHealth - used to determine overall health of the system
      Throws:
      IOException - when initialization failed
      HttpApplicationException - when initialization failed
  • Method Details

    • start

      public Handler start() throws HttpApplicationException
      Description copied from interface: HttpApplication
      Gets the root Handler that will handle all HTTP requests.

      The Handler returned from this method MUST be a singleton.

      Specified by:
      start in interface HttpApplication
      Returns:
      The Handler to handle HTTP requests.
      Throws:
      HttpApplicationException - If there is a problem constructing the root application Handler.
    • getBufferFactory

      public Factory<Buffer> getBufferFactory()
      Description copied from interface: HttpApplication
      Gets the Factory that will create temporary storage Buffers to handle the processing of requests.

      May return null indicating that the container should provide a default buffer factory.

      Specified by:
      getBufferFactory in interface HttpApplication
      Returns:
      A Buffer Factory or null.
    • stop

      public void stop()
      Description copied from interface: HttpApplication
      Called when HTTP application is shutdown.

      Implementation should use this method to clear up all remaining resources.

      Specified by:
      stop in interface HttpApplication
    • getEndpointRegistry

      public EndpointRegistry getEndpointRegistry()
      Description copied from interface: AdminHttpApplication
      Returns the API endpoint registry.
      Specified by:
      getEndpointRegistry in interface AdminHttpApplication
      Returns:
      the API endpoint registry
    • getOpenIGRouter

      public Router getOpenIGRouter()
      Description copied from interface: AdminHttpApplication
      Returns the router that represents the /openig namespace (or whatever path/prefix value that was configured).
      Specified by:
      getOpenIGRouter in interface AdminHttpApplication
      Returns:
      the router that represents the /openig namespace
    • getHeap

      public Heap getHeap()
      Description copied from interface: AdminHttpApplication
      Returns the heap based on the contents of the admin configuration.
      Specified by:
      getHeap in interface AdminHttpApplication
      Returns:
      the heap based on the contents of the admin configuration
    • restricted

      public boolean restricted()
      Returns whether the admin is restricted or not.
      Returns:
      true if the admin is restricted
    • getConfig

      public JsonValue getConfig()
      Description copied from interface: AdminHttpApplication
      Returns the configuration of the admin application.
      Specified by:
      getConfig in interface AdminHttpApplication
      Returns:
      the configuration of the admin application
    • getApiProducer

      public SwaggerApiProducer getApiProducer()
      Needed to enforce generation of CREST APIs.
      Specified by:
      getApiProducer in interface DescribedHttpApplication
      Returns:
      a swagger api producer.