Interface RouteManager<A extends ExchangeContext,B extends Exchange<A>,C extends Routable<A,B,C,D,E>,D extends RouteManager<A,B,C,D,E>,E extends Route<A,B>>

Type Parameters:
A - the type of the exchange context
B - the type of exchange handled by the route
C - the routable type
D - the route manager type
E - the route type
All Known Subinterfaces:
ErrorRouteManager<A,B,C,D,E>, ErrorWebRouteManager<A,B>, WebRouteManager<A,B>

public interface RouteManager<A extends ExchangeContext,B extends Exchange<A>,C extends Routable<A,B,C,D,E>,D extends RouteManager<A,B,C,D,E>,E extends Route<A,B>>

Base route manager interface.

A route manager is used to manage the routes of a router. It is created by a router and allows to define, enable, disable, remove and find routes in a router.

A typical implementation should define methods to set criteria used by the router to match an incoming exchange to a route and an exchange handler that eventually handles the matched exchange.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Disables all the routes that matches the criteria specified in the route manager and defined in the router it comes from.
    Enables all the routes that matches the criteria specified in the route manager and defined in the router it comes from.
    Finds all the routes that matches the criteria specified in the route manager and defined in the router it comes from.
    handler(ExchangeHandler<? super A,B> handler)
    Specifies the route exchange handler.
    Removes all the routes that matches the criteria specified in the route manager and defined in the router it comes from.
  • Method Details

    • handler

      C handler(ExchangeHandler<? super A,B> handler)

      Specifies the route exchange handler.

      This method basically appends the route specified in the route manager to the router it comes from.

      Parameters:
      handler - the route exchange handler
      Returns:
      the routable
    • enable

      C enable()

      Enables all the routes that matches the criteria specified in the route manager and defined in the router it comes from.

      Returns:
      the routable
    • disable

      C disable()

      Disables all the routes that matches the criteria specified in the route manager and defined in the router it comes from.

      Returns:
      the routable
    • remove

      C remove()

      Removes all the routes that matches the criteria specified in the route manager and defined in the router it comes from.

      Returns:
      the routable
    • findRoutes

      Set<E> findRoutes()

      Finds all the routes that matches the criteria specified in the route manager and defined in the router it comes from.

      Returns:
      a set of routes or an empty set if no route matches the criteria