org.drools.reteoo.compiled
Class NetworkHandlerAdaptor

java.lang.Object
  extended by org.drools.reteoo.compiled.NetworkHandlerAdaptor
All Implemented Interfaces:
NetworkHandler

public class NetworkHandlerAdaptor
extends Object
implements NetworkHandler

An abstract adapter class for receiving network node events from the ObjectTypeNodeParser. The methods in this class are empty. This class exists as convenience for creating handler objects.

Extend this class to create a NetworkHandler and override the methods for the nodes of interest. (If you implement the NetworkHandler interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

See Also:
NetworkHandler, ObjectTypeNodeParser

Constructor Summary
NetworkHandlerAdaptor()
           
 
Method Summary
 void endBetaNode(BetaNode betaNode)
           
 void endHashedAlphaNode(AlphaNode hashedAlpha, Object hashedValue)
           
 void endHashedAlphaNodes(ClassFieldReader hashedFieldReader)
           
 void endLeftInputAdapterNode(LeftInputAdapterNode leftInputAdapterNode)
           
 void endNonHashedAlphaNode(AlphaNode alphaNode)
          Receive notification of the end of a non-hashed AlphaNode.
 void endObjectTypeNode(ObjectTypeNode objectTypeNode)
           
 void startBetaNode(BetaNode betaNode)
           
 void startHashedAlphaNode(AlphaNode hashedAlpha, Object hashedValue)
           
 void startHashedAlphaNodes(ClassFieldReader hashedFieldReader)
          Receive notification of the a group of hashed AlphaNodes.
 void startLeftInputAdapterNode(LeftInputAdapterNode leftInputAdapterNode)
           
 void startNonHashedAlphaNode(AlphaNode alphaNode)
          Receive notification of the a non-hashed AlphaNode.
 void startObjectTypeNode(ObjectTypeNode objectTypeNode)
          Receive notification of the beginning of an ObjectTypeNode The Network parser will invoke this method only once, before any other event callback.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkHandlerAdaptor

public NetworkHandlerAdaptor()
Method Detail

startObjectTypeNode

public void startObjectTypeNode(ObjectTypeNode objectTypeNode)
Description copied from interface: NetworkHandler
Receive notification of the beginning of an ObjectTypeNode

The Network parser will invoke this method only once, before any other event callback.

Specified by:
startObjectTypeNode in interface NetworkHandler
Parameters:
objectTypeNode - the object type node
See Also:
NetworkHandler.endObjectTypeNode(org.drools.reteoo.ObjectTypeNode)

startNonHashedAlphaNode

public void startNonHashedAlphaNode(AlphaNode alphaNode)
Description copied from interface: NetworkHandler
Receive notification of the a non-hashed AlphaNode.

The Parser will invoke this method at the beginning of every non-hashed Alpha in the Network; there will be a corresponding endNonHashedAlphaNode() event for every startNonHashedAlphaNode() event. All of the node's decendants will be reported, in order, before the corresponding endNonHashedAlphaNode() event.

Specified by:
startNonHashedAlphaNode in interface NetworkHandler
Parameters:
alphaNode - non-hashed AlphaNode
See Also:
NetworkHandler.endNonHashedAlphaNode(org.drools.reteoo.AlphaNode)

endNonHashedAlphaNode

public void endNonHashedAlphaNode(AlphaNode alphaNode)
Description copied from interface: NetworkHandler
Receive notification of the end of a non-hashed AlphaNode.

The parser will invoke this method at the end of every alpha in the network; there will be a corresponding NetworkHandler.startNonHashedAlphaNode(org.drools.reteoo.AlphaNode) event for every endNonHashedAlphaNode event.

Specified by:
endNonHashedAlphaNode in interface NetworkHandler
Parameters:
alphaNode - non-hashed AlphaNode

startBetaNode

public void startBetaNode(BetaNode betaNode)
Specified by:
startBetaNode in interface NetworkHandler

endBetaNode

public void endBetaNode(BetaNode betaNode)
Specified by:
endBetaNode in interface NetworkHandler

startLeftInputAdapterNode

public void startLeftInputAdapterNode(LeftInputAdapterNode leftInputAdapterNode)
Specified by:
startLeftInputAdapterNode in interface NetworkHandler

endLeftInputAdapterNode

public void endLeftInputAdapterNode(LeftInputAdapterNode leftInputAdapterNode)
Specified by:
endLeftInputAdapterNode in interface NetworkHandler

startHashedAlphaNodes

public void startHashedAlphaNodes(ClassFieldReader hashedFieldReader)
Description copied from interface: NetworkHandler
Receive notification of the a group of hashed AlphaNodes.

The Parser will invoke this method at the beginning of every groups of hashed Alphas in the Network; there will be a corresponding NetworkHandler.endHashedAlphaNodes(org.drools.base.ClassFieldReader) event for every startHashedAlphaNodes() event. The actual alpha nodes will be reported via the NetworkHandler.startHashedAlphaNode(org.drools.reteoo.AlphaNode, java.lang.Object) method, along with all of the node's decendants, in order, before the corresponding NetworkHandler.endHashedAlphaNode(org.drools.reteoo.AlphaNode, java.lang.Object) event.

Specified by:
startHashedAlphaNodes in interface NetworkHandler
Parameters:
hashedFieldReader - field reader that is used to access the hashed attribute
See Also:
NetworkHandler.endHashedAlphaNodes(org.drools.base.ClassFieldReader), NetworkHandler.startHashedAlphaNode(org.drools.reteoo.AlphaNode, java.lang.Object)

endHashedAlphaNodes

public void endHashedAlphaNodes(ClassFieldReader hashedFieldReader)
Specified by:
endHashedAlphaNodes in interface NetworkHandler

startHashedAlphaNode

public void startHashedAlphaNode(AlphaNode hashedAlpha,
                                 Object hashedValue)
Specified by:
startHashedAlphaNode in interface NetworkHandler

endHashedAlphaNode

public void endHashedAlphaNode(AlphaNode hashedAlpha,
                               Object hashedValue)
Specified by:
endHashedAlphaNode in interface NetworkHandler

endObjectTypeNode

public void endObjectTypeNode(ObjectTypeNode objectTypeNode)
Specified by:
endObjectTypeNode in interface NetworkHandler


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.