Class OutboundAcceptContentRoutingLink<A,B,C extends AcceptContentRoute<A>,D extends AcceptContentRoute.Extractor<A,C,D>>

java.lang.Object
io.inverno.mod.http.base.router.RoutingLink<A,B,C,D>
io.inverno.mod.http.base.router.link.OutboundAcceptContentRoutingLink<A,B,C,D>
Type Parameters:
A - the resource type
B - the input type
C - the outbound accept content route type
D - the outbound accept content route extractor type

public abstract class OutboundAcceptContentRoutingLink<A,B,C extends AcceptContentRoute<A>,D extends AcceptContentRoute.Extractor<A,C,D>> extends RoutingLink<A,B,C,D>

A RoutingLink implementation resolving resources by matching the accepted content types in an input.

When considering an HTTP server, it allows to select the resource (e.g. handler) that best match the content types accepted in the request.

Since:
1.12
Author:
Jeremy Kuhn
See Also:
  • Constructor Details

    • OutboundAcceptContentRoutingLink

      public OutboundAcceptContentRoutingLink()
    • OutboundAcceptContentRoutingLink

      public OutboundAcceptContentRoutingLink(boolean strict)

      Creates a terminal outbound accept content routing link.

      Parameters:
      strict - true to throw a NotAcceptableException when no match is found, false otherwise
    • OutboundAcceptContentRoutingLink

      public OutboundAcceptContentRoutingLink(Supplier<RoutingLink<A,B,C,D>> nextLinkFactory)

      Creates a strict outbound accept content routing link in a routing chain.

      Parameters:
      nextLinkFactory - the next routing link factory
    • OutboundAcceptContentRoutingLink

      public OutboundAcceptContentRoutingLink(Supplier<RoutingLink<A,B,C,D>> nextLinkFactory, boolean strict)

      Creates an outbound accept content routing link in a routing chain.

      Parameters:
      nextLinkFactory - the next routing link factory
      strict - true to throw a NotAcceptableException when no match is found, false otherwise
  • Method Details