Class Routes

java.lang.Object
com.arpnetworking.http.Routes
All Implemented Interfaces:
Serializable, org.apache.pekko.japi.Function<org.apache.pekko.http.javadsl.model.HttpRequest,CompletionStage<org.apache.pekko.http.javadsl.model.HttpResponse>>, org.apache.pekko.japi.function.Function<org.apache.pekko.http.javadsl.model.HttpRequest,CompletionStage<org.apache.pekko.http.javadsl.model.HttpResponse>>

public final class Routes extends Object implements org.apache.pekko.japi.function.Function<org.apache.pekko.http.javadsl.model.HttpRequest,CompletionStage<org.apache.pekko.http.javadsl.model.HttpResponse>>, org.apache.pekko.japi.Function<org.apache.pekko.http.javadsl.model.HttpRequest,CompletionStage<org.apache.pekko.http.javadsl.model.HttpResponse>>
Http server routes.
Author:
Ville Koskela (ville dot koskela at inscopemetrics dot io)
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Routes(org.apache.pekko.actor.ActorSystem actorSystem, com.arpnetworking.metrics.incubator.PeriodicMetrics metrics, String healthCheckPath, String statusPath, com.google.common.collect.ImmutableList<SupplementalRoutes> supplementalRoutes)
    Public constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    CompletionStage<org.apache.pekko.http.javadsl.model.HttpResponse>
    apply(org.apache.pekko.http.javadsl.model.HttpRequest request)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Routes

      public Routes(org.apache.pekko.actor.ActorSystem actorSystem, com.arpnetworking.metrics.incubator.PeriodicMetrics metrics, String healthCheckPath, String statusPath, com.google.common.collect.ImmutableList<SupplementalRoutes> supplementalRoutes)
      Public constructor.
      Parameters:
      actorSystem - Instance of ActorSystem.
      metrics - Instance of PeriodicMetrics.
      healthCheckPath - The path for the health check.
      statusPath - The path for the status.
      supplementalRoutes - List of supplemental routes in priority order.
  • Method Details

    • apply

      public CompletionStage<org.apache.pekko.http.javadsl.model.HttpResponse> apply(org.apache.pekko.http.javadsl.model.HttpRequest request)
      Specified by:
      apply in interface org.apache.pekko.japi.Function<org.apache.pekko.http.javadsl.model.HttpRequest,CompletionStage<org.apache.pekko.http.javadsl.model.HttpResponse>>
      Specified by:
      apply in interface org.apache.pekko.japi.function.Function<org.apache.pekko.http.javadsl.model.HttpRequest,CompletionStage<org.apache.pekko.http.javadsl.model.HttpResponse>>