com.ibm.btt.channel
Class AbstractChannelPolicy
java.lang.Object
com.ibm.btt.channel.AbstractChannelPolicy
- All Implemented Interfaces:
- ChannelPolicyHandler
public abstract class AbstractChannelPolicy
- extends java.lang.Object
- implements ChannelPolicyHandler
The abstract class of channel policy implementation. It uses the ruleService
defined in the btt.xml channel handler section to connect to the rule engine.
The subclass needs to implement 1) getInputParameter method to convert the
data from channel context to the input parameters of the rule. 2)
processResult method to process the result after checking the rule.
Method Summary |
PolicyResult |
doCheck(ChannelContext ctx)
Check the channel scope policy |
protected abstract java.util.Map<java.lang.String,java.lang.Object> |
getInputParameter(ChannelContext ctx)
Construct the input parameters using the data from the operation context
or getting from data store. |
protected abstract PolicyResult |
processResult(java.util.Map<java.lang.String,java.lang.Object> result)
Subclass override this method to process the result |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RULESERVICE
public static final java.lang.String RULESERVICE
- See Also:
- Constant Field Values
AbstractChannelPolicy
public AbstractChannelPolicy()
getInputParameter
protected abstract java.util.Map<java.lang.String,java.lang.Object> getInputParameter(ChannelContext ctx)
- Construct the input parameters using the data from the operation context
or getting from data store.
- Parameters:
inputParameters
- the JRules input parameters
processResult
protected abstract PolicyResult processResult(java.util.Map<java.lang.String,java.lang.Object> result)
- Subclass override this method to process the result
- Parameters:
result
-
doCheck
public PolicyResult doCheck(ChannelContext ctx)
- Check the channel scope policy
- Specified by:
doCheck
in interface ChannelPolicyHandler
- Parameters:
ctx
- the channel context, the user can get the data and construct
the object that is used in the policy
- Returns:
- the policy result
(c) Copyright IBM Corporation 1998, 2011