com.hammurapi.reasoning.impl
Class InferenceMethodNode<F>

java.lang.Object
  extended by com.hammurapi.reasoning.impl.ReasoningNodeBase<F>
      extended by com.hammurapi.reasoning.impl.InferenceMethodNode<F>
All Implemented Interfaces:
FlowElement, Node<List<?>,Integer,KnowledgeBase<F>,com.hammurapi.reasoning.impl.InferenceToken<F>>

public class InferenceMethodNode<F>
extends ReasoningNodeBase<F>


Field Summary
 
Fields inherited from class com.hammurapi.reasoning.impl.ReasoningNodeBase
isFine, knowledgeBase, method, methodName, parameterTypes, pins, rule, ruleDescription, ruleName
 
Constructor Summary
InferenceMethodNode()
           
 
Method Summary
protected  boolean handleException(Object[] args, Exception e)
          Handles method invocation exception.
protected  void onConclusion(Object[] args, F conclusion)
          This method is invoked before conclusion is put to the knowledge base.
protected  Collection<Future<?>> process(KnowledgeBase<F> flowState, List<com.hammurapi.reasoning.impl.InferenceToken<F>>[] inputs, PropertySet properties, Context context, List<ProcessingPathElement> processingPath, Joiner.InputConsumer consumer, int activator)
          Processes inputs.
 
Methods inherited from class com.hammurapi.reasoning.impl.ReasoningNodeBase
addPin, afterConnect, beforeConnect, getInputPins, getInvocable, getInvoker, getPriority, invoke, partialJoin, setKnowledgeBase, setMethodName, setParameterTypes, setPriority, setRuleDescription, setRuleIndex, setRuleName, setRules, sortInputs, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InferenceMethodNode

public InferenceMethodNode()
Method Detail

process

protected Collection<Future<?>> process(KnowledgeBase<F> flowState,
                                        List<com.hammurapi.reasoning.impl.InferenceToken<F>>[] inputs,
                                        PropertySet properties,
                                        Context context,
                                        List<ProcessingPathElement> processingPath,
                                        Joiner.InputConsumer consumer,
                                        int activator)
                                 throws Exception
Description copied from class: ReasoningNodeBase
Processes inputs.

Specified by:
process in class ReasoningNodeBase<F>
inputs - Inputs.
properties - Properties.
context - Context.
processingPath - Processing path.
consumer - Input consumer.
Returns:
Collection of future results.
Throws:
Exception - If anything goes wrong.

onConclusion

protected void onConclusion(Object[] args,
                            F conclusion)
This method is invoked before conclusion is put to the knowledge base. Rule classes can override this method to augment conclusions, e.g. inject some properties.

Parameters:
conclusion -

handleException

protected boolean handleException(Object[] args,
                                  Exception e)
                           throws Exception
Handles method invocation exception. This implementation invokes ExceptionListener.onException() if exception listener is not null.

Parameters:
e - Exception.
Returns:
True if exception was handled.
Throws:
Exception