Class ObjectTypeNode

  • All Implemented Interfaces:
    java.io.Serializable, org.drools.base.common.NetworkNode, ObjectSink, Sink
    Direct Known Subclasses:
    ReteObjectTypeNode

    public class ObjectTypeNode
    extends ObjectSource
    implements ObjectSink
    ObjectTypeNodes are responsible for filtering and propagating the matching fact assertions propagated from the Rete node using ObjectType interface.

    The assert and retract methods do not attempt to filter as this is the role of the Rete node which builds up a cache of matching ObjectTypdeNodess for each asserted object, using the matches(Object object) method. Incorrect propagation in these methods is not checked and will result in ClassCastExpcections later on in the network.

    Filters Objects coming from the Rete using a ObjectType semantic module.

    See Also:
    Rete, Serialized Form
    • Field Detail

      • objectType

        protected org.drools.base.base.ObjectType objectType
        The ObjectType semantic module.
      • idGenerator

        protected transient org.drools.core.reteoo.ObjectTypeNode.IdGenerator idGenerator
    • Constructor Detail

      • ObjectTypeNode

        public ObjectTypeNode()
      • ObjectTypeNode

        public ObjectTypeNode​(int id,
                              EntryPointNode source,
                              org.drools.base.base.ObjectType objectType,
                              BuildContext context)
        Construct given a semantic ObjectType and the provided unique id. All ObjectTypdeNode have node memory.
        Parameters:
        id - The unique id for the node.
        objectType - The semantic object-type differentiator.