Package org.drools

Examples of org.drools.WorkingMemoryEventManager


        workingMemory.addEventListener( (RuleBaseEventListener) this );
    }
   
    public WorkingMemoryLogger(final KnowledgeRuntimeEventManager session) {
        if (session instanceof StatefulKnowledgeSessionImpl) {
            WorkingMemoryEventManager eventManager = ((StatefulKnowledgeSessionImpl) session).session;
            eventManager.addEventListener( (WorkingMemoryEventListener) this );
            eventManager.addEventListener( (AgendaEventListener) this );
            eventManager.addEventListener( (RuleBaseEventListener) this );
            InternalProcessRuntime processRuntime = ((StatefulKnowledgeSessionImpl) session).session.getProcessRuntime();
            if (processRuntime != null) {
                processRuntime.addEventListener( (ProcessEventListener) this );
            }
        } else if (session instanceof StatelessKnowledgeSessionImpl) {
            ((StatelessKnowledgeSessionImpl) session).workingMemoryEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).agendaEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).processEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).getRuleBase().addEventListener( this );
        } else if (session instanceof CommandBasedStatefulKnowledgeSession) {
            ReteooWorkingMemory eventManager =
                ((StatefulKnowledgeSessionImpl)((KnowledgeCommandContext)((CommandBasedStatefulKnowledgeSession) session).getCommandService().getContext()).getStatefulKnowledgesession()).session;
            eventManager.addEventListener( (WorkingMemoryEventListener) this );
            eventManager.addEventListener( (AgendaEventListener) this );
            InternalProcessRuntime processRuntime = eventManager.getProcessRuntime();
            eventManager.addEventListener( (RuleBaseEventListener) this );
            if (processRuntime != null) {
                processRuntime.addEventListener( (ProcessEventListener) this );
            }
        } else {
            throw new IllegalArgumentException("Not supported session in logger: " + session.getClass());
View Full Code Here


        workingMemoryEventManager.addEventListener( (RuleBaseEventListener) this );
    }
   
    public WorkingMemoryLogger(final KnowledgeRuntimeEventManager session) {
      if (session instanceof StatefulKnowledgeSessionImpl) {
        WorkingMemoryEventManager eventManager = ((StatefulKnowledgeSessionImpl) session).session;
        eventManager.addEventListener( (WorkingMemoryEventListener) this );
        eventManager.addEventListener( (AgendaEventListener) this );
        eventManager.addEventListener( (RuleFlowEventListener) this );
        eventManager.addEventListener( (RuleBaseEventListener) this );
      } else if (session instanceof StatelessKnowledgeSessionImpl) {
        ((StatelessKnowledgeSessionImpl) session).workingMemoryEventSupport.addEventListener( this );
        ((StatelessKnowledgeSessionImpl) session).agendaEventSupport.addEventListener( this );
        ((StatelessKnowledgeSessionImpl) session).ruleFlowEventSupport.addEventListener( this );
        ((StatelessKnowledgeSessionImpl) session).getRuleBase().addEventListener( this );
View Full Code Here

        workingMemory.addEventListener( (RuleBaseEventListener) this );
    }
   
    public WorkingMemoryLogger(final KnowledgeRuntimeEventManager session) {
        if (session instanceof StatefulKnowledgeSessionImpl) {
            WorkingMemoryEventManager eventManager = ((StatefulKnowledgeSessionImpl) session).session;
            eventManager.addEventListener( (WorkingMemoryEventListener) this );
            eventManager.addEventListener( (RuleBaseEventListener) this );
            eventManager.addEventListener( (RuleBaseEventListener) this );
            InternalProcessRuntime processRuntime = ((StatefulKnowledgeSessionImpl) session).session.getProcessRuntime();
            if (processRuntime != null) {
                processRuntime.addEventListener( (ProcessEventListener) this );
            }
        } else if (session instanceof StatelessKnowledgeSessionImpl) {
            ((StatelessKnowledgeSessionImpl) session).workingMemoryEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).agendaEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).processEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).getRuleBase().addEventListener( this );
        } else if (session instanceof CommandBasedStatefulKnowledgeSession) {
            ReteooWorkingMemory eventManager =
                ((StatefulKnowledgeSessionImpl)((KnowledgeCommandContext)((CommandBasedStatefulKnowledgeSession) session).getCommandService().getContext()).getStatefulKnowledgesession()).session;
            eventManager.addEventListener( (WorkingMemoryEventListener) this );
            eventManager.addEventListener( (AgendaEventListener) this );
            InternalProcessRuntime processRuntime = eventManager.getProcessRuntime();
            eventManager.addEventListener( (RuleBaseEventListener) this );
            if (processRuntime != null) {
                processRuntime.addEventListener( (ProcessEventListener) this );
            }
        } else {
            throw new IllegalArgumentException("Not supported session in logger: " + session.getClass());
View Full Code Here

        workingMemoryEventManager.addEventListener( (RuleBaseEventListener) this );
    }
   
    public WorkingMemoryLogger(final KnowledgeRuntimeEventManager session) {
      if (session instanceof StatefulKnowledgeSessionImpl) {
        WorkingMemoryEventManager eventManager = ((StatefulKnowledgeSessionImpl) session).session;
        eventManager.addEventListener( (WorkingMemoryEventListener) this );
        eventManager.addEventListener( (AgendaEventListener) this );
        eventManager.addEventListener( (RuleFlowEventListener) this );
        eventManager.addEventListener( (RuleBaseEventListener) this );
      } else if (session instanceof StatelessKnowledgeSessionImpl) {
        ((StatelessKnowledgeSessionImpl) session).workingMemoryEventSupport.addEventListener( this );
        ((StatelessKnowledgeSessionImpl) session).agendaEventSupport.addEventListener( this );
        ((StatelessKnowledgeSessionImpl) session).ruleFlowEventSupport.addEventListener( this );
        ((StatelessKnowledgeSessionImpl) session).getRuleBase().addEventListener( this );
      } else if (session instanceof CommandBasedStatefulKnowledgeSession) {
        WorkingMemoryEventManager eventManager =
          ((StatefulKnowledgeSessionImpl)((KnowledgeCommandContext)((CommandBasedStatefulKnowledgeSession) session).getCommandService().getContext()).getStatefulKnowledgesession()).session;
        eventManager.addEventListener( (WorkingMemoryEventListener) this );
        eventManager.addEventListener( (AgendaEventListener) this );
        eventManager.addEventListener( (RuleFlowEventListener) this );
        eventManager.addEventListener( (RuleBaseEventListener) this );
      } else {
        throw new IllegalArgumentException("Not supported session in logger: " + session.getClass());
      }
    }
View Full Code Here

        workingMemory.addEventListener( (RuleBaseEventListener) this );
    }
   
    public WorkingMemoryLogger(final KnowledgeRuntimeEventManager session) {
        if (session instanceof StatefulKnowledgeSessionImpl) {
            WorkingMemoryEventManager eventManager = ((StatefulKnowledgeSessionImpl) session).session;
            eventManager.addEventListener( (WorkingMemoryEventListener) this );
            eventManager.addEventListener( (AgendaEventListener) this );
            eventManager.addEventListener( (RuleBaseEventListener) this );
            InternalProcessRuntime processRuntime = ((StatefulKnowledgeSessionImpl) session).session.getProcessRuntime();
            if (processRuntime != null) {
                processRuntime.addEventListener( (ProcessEventListener) this );
            }
        } else if (session instanceof StatelessKnowledgeSessionImpl) {
            ((StatelessKnowledgeSessionImpl) session).workingMemoryEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).agendaEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).processEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).getRuleBase().addEventListener( this );
        } else if (session instanceof CommandBasedStatefulKnowledgeSession) {
            ReteooWorkingMemoryInterface eventManager =
                ((StatefulKnowledgeSessionImpl)((KnowledgeCommandContext)((CommandBasedStatefulKnowledgeSession) session).getCommandService().getContext()).getKieSession()).session;
            eventManager.addEventListener( (WorkingMemoryEventListener) this );
            eventManager.addEventListener( (AgendaEventListener) this );
            InternalProcessRuntime processRuntime = eventManager.getProcessRuntime();
            eventManager.addEventListener( (RuleBaseEventListener) this );
            if (processRuntime != null) {
                processRuntime.addEventListener( (ProcessEventListener) this );
            }
        } else {
            throw new IllegalArgumentException("Not supported session in logger: " + session.getClass());
View Full Code Here

        workingMemory.addEventListener( (RuleBaseEventListener) this );
    }
   
    public WorkingMemoryLogger(final KnowledgeRuntimeEventManager session) {
        if (session instanceof StatefulKnowledgeSessionImpl) {
            WorkingMemoryEventManager eventManager = ((StatefulKnowledgeSessionImpl) session).session;
            eventManager.addEventListener( (WorkingMemoryEventListener) this );
            eventManager.addEventListener( (AgendaEventListener) this );
            eventManager.addEventListener( (RuleBaseEventListener) this );
            InternalProcessRuntime processRuntime = ((StatefulKnowledgeSessionImpl) session).session.getProcessRuntime();
            if (processRuntime != null) {
                processRuntime.addEventListener( (ProcessEventListener) this );
            }
        } else if (session instanceof StatelessKnowledgeSessionImpl) {
            ((StatelessKnowledgeSessionImpl) session).workingMemoryEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).agendaEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).processEventSupport.addEventListener( this );
            ((StatelessKnowledgeSessionImpl) session).getRuleBase().addEventListener( this );
        } else if (session instanceof CommandBasedStatefulKnowledgeSession) {
            ReteooWorkingMemoryInterface eventManager =
                ((StatefulKnowledgeSessionImpl)((KnowledgeCommandContext)((CommandBasedStatefulKnowledgeSession) session).getCommandService().getContext()).getStatefulKnowledgesession()).session;
            eventManager.addEventListener( (WorkingMemoryEventListener) this );
            eventManager.addEventListener( (AgendaEventListener) this );
            InternalProcessRuntime processRuntime = eventManager.getProcessRuntime();
            eventManager.addEventListener( (RuleBaseEventListener) this );
            if (processRuntime != null) {
                processRuntime.addEventListener( (ProcessEventListener) this );
            }
        } else {
            throw new IllegalArgumentException("Not supported session in logger: " + session.getClass());
View Full Code Here

TOP

Related Classes of org.drools.WorkingMemoryEventManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.