Class MethodSelectingRouter

  • All Implemented Interfaces:
    Router

    final class MethodSelectingRouter
    extends java.lang.Object
    implements Router
    A single router responsible for selecting a single method from all the methods bound to the same routed request path. The method selection algorithm selects the handling method based on the HTTP request method name, requested media type as well as defined resource method media type capabilities.
    • Constructor Detail

      • MethodSelectingRouter

        MethodSelectingRouter​(MessageBodyWorkers workers,
                              java.util.List<MethodRouting> methodRoutings)
        Create a new MethodSelectingRouter for all the methods on the same path. The router selects the method that best matches the request based on produce/consume information from the resource method models.
        Parameters:
        workers - message body workers.
        methodRoutings - [method model, method methodAcceptorPair] pairs.