UNICOM® Digital Transformation Toolkit (UDTT™) provides an abstract channel policy handler, com.ibm.btt.channel.AbstractChannelPolicy, to handle policy in the channel level.
The doCheck method in the AbstractChannelPolicy class provides a default implementation to use the defined rule service to do channel level policy management. Technical developers can override the method as needed.
Technical developers should override the following two methods in their handler implementation:
Is used to parse the results returned from rule provider service.
com.ibm.btt.channel.PolicyResult is the return type of the processResult method. It includes the execution result of policy check. If the policy check has been passed, the UDTT channel provider will continue the request processing. Otherwise, the UDTT channel driver will throw the com.ibm.btt.channel.ChannelPolicyException exception. The messages in PolicyResult are used to keep the messages generated during the rule check.