Interface BaseWebRoute<A extends ExchangeContext,B extends Exchange<A>>

Type Parameters:
A - the exchange context type
B - the exchange type
All Known Subinterfaces:
ErrorWebRoute<A>, WebRoute<A>, WebSocketRoute<A>

public interface BaseWebRoute<A extends ExchangeContext,B extends Exchange<A>>

Base Web route representing WebRoute, WebSocketRoute and ErrorWebRoute.

Since:
1.12
Author:
Jeremy Kuhn
  • Method Details

    • enable

      void enable()

      Enables the route.

    • disable

      void disable()

      Disables the route.

    • isDisabled

      boolean isDisabled()

      Determines whether this route is disabled.

      Returns:
      true if the route is disabled false otherwise
    • remove

      void remove()

      Removes the route.

    • getInterceptors

      List<ExchangeInterceptor<A,B>> getInterceptors()

      Returns the list of interceptors currently applied to the route.

      Note that this method returns the raw interceptors that were specified on the route either by using an interceptor manager or explicitly by invoking setInterceptors(java.util.List). When specified with an interceptor manager and depending on the criteria that were specified at the time, a raw interceptor might actually be wrapped to filter requests that are matching the route criteria. For instance, an interceptor that intercepts GET exchanges will be defined on the default route (ie. defined with no criteria) but it will only be invoked on GET exchange.

      Returns:
      a list of interceptors
    • setInterceptors

      void setInterceptors(List<ExchangeInterceptor<A,B>> exchangeInterceptors)

      Sets the list of interceptors to apply to the route.

      This method will replace the interceptors previously defined on the route. Unlike interceptors defined using an interceptor manager, the specified interceptors are not filtered and intercept all exchanges handled by the route.

      Parameters:
      exchangeInterceptors - a list of interceptors