Skip to content

Provider Annotation Processor

Past due by over 4 years 36% complete

Provider annotations are used to expose resources with certain guarantees, those resources will be registered under the FrontierAPI.
The annotation will be caught by Spring BeanPostProcessor in run time, making the expression inside the annotation not compile time safe. After being caught by the BeanPostProcessor, the class will be consumed with respect t…

Provider annotations are used to expose resources with certain guarantees, those resources will be registered under the FrontierAPI.
The annotation will be caught by Spring BeanPostProcessor in run time, making the expression inside the annotation not compile time safe. After being caught by the BeanPostProcessor, the class will be consumed with respect to the following several phases:

  1. Register phase
  2. Wake phase

Register phase

Register annotations are used to query FrontierAPI and contruct a client for the exposed resource based on the response configuration from the FrontierAPI.
All of the Frontier configuration will be interpreted to provide specific logic. The data relevant here is:

  • Class canonical path
  • Service name
  • Methods (name, return Type, variables Type)
  • Annotation attributes: Guarantee, isCacheable and maskedFaults

Based on the Return type and arguments, a serializable DTO will be created both for sending and receiving purposes, in each case. The guarantee will determine the sending protocol, and what type of Bean is to be created.

  • Synchronous - @RestController bean
  • Asynchronous|Best-effort - RabbitMQ with different set of configuration parameters
    Register all the configurations to be initialised in the next stage.

Wake phase

This phase will pick the generated configuration, based on the Register phase, and will register on the Frontier API what endpoints are being exposed, and to what purpose. This will be useful so that the Consumer side can query the Frontier API for exposed configurations.

Loading