Package io.vertigo.vega.impl.webservice
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 TypeMethodDescriptionbooleanaccept(WebServiceDefinition webServiceDefinition) intReturn 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
- 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- Requestresponse- ResponsewebServiceCallContext- Context of this requestchain- 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 beRestfulServiceWebServiceHandlerPluginwhich has the index 120. Therefore the provided index must be between 0 and 119- Returns:
- the index (between 0 and 119)
-