Having been through the custom policies that can be created with both Java and Groovy, the question begs when to use which approach? To know which approach to use (Groovy or Java) means understanding the pros and cons of each approach. Why these pros and cons exist will become apparent as the chapter works through how custom policies work and are developed.
Java Pros:
- Will appear as a re-usable policy across all gateways and available immediately to all APIs (compared to Groovy which would require the logic to be cut and pasted every time the policy needs to be used in a new API)
- The policy is built using traditional development techniques, as a result, complex logic can be more easily developed (compared with a Groovy policy) with all the quality processes that go with this kind of development including:
- Opportunity to include...