The core of the Java policy is the implementation of a factory and several Java interfaces. The interfaces implemented aren't used in the Groovy policies explicitly but based on the description of the way Groovy works the role they play can be recognized.
The policy configuration values are provided through the policy factory as a JSONObject. By caching these values in the custom policy, they can be referred to at any time, although ideally all the data preparation is performed within the factory and held in memory if at all possible to ensure the policy will execute quickly. It is important to remember that the custom policy will need to be quick in execution, otherwise, it will have a significant impact on the number of API ...