net.esper.pattern
Class PatternStateFactoryImpl

java.lang.Object
  extended by net.esper.pattern.PatternStateFactoryImpl
All Implemented Interfaces:
PatternStateFactory

public class PatternStateFactoryImpl
extends Object
implements PatternStateFactory

Default pattern state factory.


Constructor Summary
PatternStateFactoryImpl()
           
 
Method Summary
 EvalStateNode makeAndStateNode(Evaluator parentNode, EvalAndNode evalAndNode, MatchedEventMap beginState, Object stateNodeId)
          Makes a followed-by state node.
 EvalStateNode makeEveryStateNode(Evaluator parentNode, EvalEveryNode evalEveryNode, MatchedEventMap beginState, PatternContext context, Object stateNodeId)
          Makes a every-state node.
 EvalStateNode makeFilterStateNode(Evaluator parentNode, EvalFilterNode evalFilterNode, MatchedEventMap beginState, Object stateNodeId)
          Makes a followed-by state node.
 EvalStateNode makeFollowedByState(Evaluator parentNode, EvalFollowedByNode evalFollowedByNode, MatchedEventMap beginState, Object stateNodeId)
          Makes a followed-by state node.
 EvalStateNode makeGuardState(Evaluator parentNode, EvalGuardNode evalGuardNode, MatchedEventMap beginState, PatternContext context, Object stateNodeId)
          Makes a guard state node.
 EvalStateNode makeNotNode(Evaluator parentNode, EvalNotNode evalNotNode, MatchedEventMap beginState, Object stateNodeId)
          Makes a followed-by state node.
 EvalStateNode makeObserverNode(Evaluator parentNode, EvalObserverNode evalObserverNode, MatchedEventMap beginState, Object stateNodeId)
          Makes a followed-by state node.
 EvalStateNode makeOrState(Evaluator parentNode, EvalOrNode evalOrNode, MatchedEventMap beginState, PatternContext context, Object stateNodeId)
          Makes an or-state node.
 EvalStateNode makeParentStateNode(EvalNode evalNode, MatchedEventMap matchEvents, Object stateObjectId)
          Makes a parent state node for the child state node.
 EvalStateNode makeRootNode(EvalNode evalChildNode, MatchedEventMap beginState)
          Makes a root state node.
 EvalStateNode makeStateNode(EvalNodeNumber evalNodeNumber, MatchedEventMap matchEvents, Object stateObjectId)
          Makes any new state node.
 void setContext(PatternContext context)
          Sets the services for pattern state objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternStateFactoryImpl

public PatternStateFactoryImpl()
Method Detail

setContext

public void setContext(PatternContext context)
Description copied from interface: PatternStateFactory
Sets the services for pattern state objects.

Specified by:
setContext in interface PatternStateFactory
Parameters:
context - is a pattern-level services

makeGuardState

public EvalStateNode makeGuardState(Evaluator parentNode,
                                    EvalGuardNode evalGuardNode,
                                    MatchedEventMap beginState,
                                    PatternContext context,
                                    Object stateNodeId)
Description copied from interface: PatternStateFactory
Makes a guard state node.

Specified by:
makeGuardState in interface PatternStateFactory
Parameters:
parentNode - is the parent evaluator
evalGuardNode - is the factory node
beginState - is the begin state
context - is the pattern context
stateNodeId - is the state node's object id
Returns:
state node

makeOrState

public EvalStateNode makeOrState(Evaluator parentNode,
                                 EvalOrNode evalOrNode,
                                 MatchedEventMap beginState,
                                 PatternContext context,
                                 Object stateNodeId)
Description copied from interface: PatternStateFactory
Makes an or-state node.

Specified by:
makeOrState in interface PatternStateFactory
Parameters:
parentNode - is the parent evaluator
evalOrNode - is the factory node
beginState - is the begin state
context - is the pattern context
stateNodeId - is the state node's object id
Returns:
state node

makeEveryStateNode

public EvalStateNode makeEveryStateNode(Evaluator parentNode,
                                        EvalEveryNode evalEveryNode,
                                        MatchedEventMap beginState,
                                        PatternContext context,
                                        Object stateNodeId)
Description copied from interface: PatternStateFactory
Makes a every-state node.

Specified by:
makeEveryStateNode in interface PatternStateFactory
Parameters:
parentNode - is the parent evaluator
evalEveryNode - is the factory node
beginState - is the begin state
context - is the pattern context
stateNodeId - is the state node's object id
Returns:
state node

makeNotNode

public EvalStateNode makeNotNode(Evaluator parentNode,
                                 EvalNotNode evalNotNode,
                                 MatchedEventMap beginState,
                                 Object stateNodeId)
Description copied from interface: PatternStateFactory
Makes a followed-by state node.

Specified by:
makeNotNode in interface PatternStateFactory
Parameters:
parentNode - is the parent evaluator
evalNotNode - is the factory node
beginState - is the begin state
stateNodeId - is the state node's object id
Returns:
state node

makeAndStateNode

public EvalStateNode makeAndStateNode(Evaluator parentNode,
                                      EvalAndNode evalAndNode,
                                      MatchedEventMap beginState,
                                      Object stateNodeId)
Description copied from interface: PatternStateFactory
Makes a followed-by state node.

Specified by:
makeAndStateNode in interface PatternStateFactory
Parameters:
parentNode - is the parent evaluator
evalAndNode - is the factory node
beginState - is the begin state
stateNodeId - is the state node's object id
Returns:
state node

makeRootNode

public EvalStateNode makeRootNode(EvalNode evalChildNode,
                                  MatchedEventMap beginState)
Description copied from interface: PatternStateFactory
Makes a root state node.

Specified by:
makeRootNode in interface PatternStateFactory
Parameters:
evalChildNode - is the first child node of the root node
beginState - is the state node's begin state
Returns:
root state node

makeObserverNode

public EvalStateNode makeObserverNode(Evaluator parentNode,
                                      EvalObserverNode evalObserverNode,
                                      MatchedEventMap beginState,
                                      Object stateNodeId)
Description copied from interface: PatternStateFactory
Makes a followed-by state node.

Specified by:
makeObserverNode in interface PatternStateFactory
Parameters:
parentNode - is the parent evaluator
evalObserverNode - is the factory node
beginState - is the begin state
stateNodeId - is the state node's object id
Returns:
state node

makeFollowedByState

public EvalStateNode makeFollowedByState(Evaluator parentNode,
                                         EvalFollowedByNode evalFollowedByNode,
                                         MatchedEventMap beginState,
                                         Object stateNodeId)
Description copied from interface: PatternStateFactory
Makes a followed-by state node.

Specified by:
makeFollowedByState in interface PatternStateFactory
Parameters:
parentNode - is the parent evaluator
evalFollowedByNode - is the factory node
beginState - is the begin state
stateNodeId - is the state node's object id
Returns:
state node

makeFilterStateNode

public EvalStateNode makeFilterStateNode(Evaluator parentNode,
                                         EvalFilterNode evalFilterNode,
                                         MatchedEventMap beginState,
                                         Object stateNodeId)
Description copied from interface: PatternStateFactory
Makes a followed-by state node.

Specified by:
makeFilterStateNode in interface PatternStateFactory
Parameters:
parentNode - is the parent evaluator
evalFilterNode - is the factory node
beginState - is the begin state
stateNodeId - is the state node's object id
Returns:
state node

makeStateNode

public EvalStateNode makeStateNode(EvalNodeNumber evalNodeNumber,
                                   MatchedEventMap matchEvents,
                                   Object stateObjectId)
Description copied from interface: PatternStateFactory
Makes any new state node.

Specified by:
makeStateNode in interface PatternStateFactory
Parameters:
evalNodeNumber - is the factory node number
matchEvents - is the begin state
stateObjectId - is the state node's object id
Returns:
state node

makeParentStateNode

public EvalStateNode makeParentStateNode(EvalNode evalNode,
                                         MatchedEventMap matchEvents,
                                         Object stateObjectId)
Description copied from interface: PatternStateFactory
Makes a parent state node for the child state node.

Specified by:
makeParentStateNode in interface PatternStateFactory
Parameters:
evalNode - is the factory for the parent node
matchEvents - is the current match state
stateObjectId - is the parent state object id
Returns:
parent state object

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com