Custom policies work by providing a means for the policy to incorporate some Groovy code that is then executed by the gateway. The Groovy policies have the means to interact with the gateway engine through some language interface classes. The use of Groovy is also subject to some constraints due to the way that the language is optimized for runtime. In the following sections, the interface layer and then constraints will be explained and illustrated with a real example.
How Groovy custom policies work?
APIs to access call data
For the Groovy policies to be of value, they obviously need to be able to access the information relating to the API call. This is solved by providing several java interfaces that can be invoked by Groovy...