java.lang.Object
org.glassfish.jersey.server.internal.routing.Routers

final class Routers extends Object
Routing tree assembly utilities.
  • Field Details

    • IDENTITY_ROUTER

      private static final Router IDENTITY_ROUTER
  • Constructor Details

    • Routers

      private Routers()
  • Method Details

    • noop

      public static Router noop()
      Create a terminal "no-op router" that accepts any input context and returns the unchanged request and an empty continuation iterator.
      Returns:
      a terminal "no-op" router.
    • endpoint

      public static Router endpoint(Endpoint endpoint)
      Creates a terminal Router that wraps the given endpoint. The Router.apply(org.glassfish.jersey.server.internal.process.RequestProcessingContext) method of the created hierarchical router returns the unchanged request and an empty continuation iterator.
      Parameters:
      endpoint - a server-side endpoint to be wrapped in a router instance.
      Returns:
      a router that wraps the supplied endpoint.
    • extractEndpoint

      public static Endpoint extractEndpoint(Router router)
      Extract endpoint stored in a router (if any).
      Parameters:
      router - router from which a server endpoint should be extracted.
      Returns:
      extracted endpoint or null if there was no endpoint stored in the router.