Interface WebServiceHandlerPlugin

All Superinterfaces:
io.vertigo.core.node.component.CoreComponent, io.vertigo.core.node.component.Plugin
All Known Implementing Classes:
AccessTokenWebServiceHandlerPlugin, AnalyticsWebServiceHandlerPlugin, ApiKeyWebServiceHandlerPlugin, CorsAllowerWebServiceHandlerPlugin, ExceptionWebServiceHandlerPlugin, JsonConverterWebServiceHandlerPlugin, RateLimitingWebServiceHandlerPlugin, RestfulServiceWebServiceHandlerPlugin, SecurityWebServiceHandlerPlugin, ServerSideStateWebServiceHandlerPlugin, SessionInvalidateWebServiceHandlerPlugin, SessionWebServiceHandlerPlugin, ValidatorWebServiceHandlerPlugin

public interface WebServiceHandlerPlugin extends io.vertigo.core.node.component.Plugin
Handler of WebService Route, are defined as plugins of WebServiceManager.
Author:
npiedeloup
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(WebServiceDefinition webServiceDefinition)
     
    int
    Return an index to compute the order of the handlers stack.
    handle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, WebServiceCallContext webServiceCallContext, HandlerChain chain)
    Do handle of this route.
  • Method Details

    • accept

      boolean accept(WebServiceDefinition webServiceDefinition)
      Parameters:
      webServiceDefinition - WebServiceDefinition
      Returns:
      If this handler should be use for this webService
    • handle

      Object handle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, WebServiceCallContext webServiceCallContext, HandlerChain chain) throws SessionException
      Do handle of this route.
      Parameters:
      request - Request
      response - Response
      webServiceCallContext - Context of this request
      chain - current HandlerChain.
      Returns:
      Response body
      Throws:
      SessionException - Session expired exception
    • getStackIndex

      int getStackIndex()
      Return an index to compute the order of the handlers stack. Please check the index of the provided handlers by vertigo and choose the index for yours accordingly. Vertigo's handlers start à 10 and leave a space of 10 between each. The last handler must be RestfulServiceWebServiceHandlerPlugin which has the index 120. Therefore the provided index must be between 0 and 119
      Returns:
      the index (between 0 and 119)