001: package org.drools;
002:
003: /*
004: * Copyright 2005 JBoss Inc
005: *
006: * Licensed under the Apache License, Version 2.0 (the "License");
007: * you may not use this file except in compliance with the License.
008: * You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing, software
013: * distributed under the License is distributed on an "AS IS" BASIS,
014: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015: * See the License for the specific language governing permissions and
016: * limitations under the License.
017: */
018:
019: import java.io.Serializable;
020: import java.util.List;
021:
022: import org.drools.event.AgendaEventListener;
023: import org.drools.event.AgendaEventSupport;
024: import org.drools.event.RuleFlowEventListener;
025: import org.drools.event.RuleFlowEventSupport;
026: import org.drools.event.WorkingMemoryEventListener;
027: import org.drools.event.WorkingMemoryEventSupport;
028:
029: /**
030: * The EventManager class is implemented by classes wishing to add,remove and get the various Drools EventListeners.
031: *
032: */
033: public interface EventManager extends Serializable {
034: /**
035: * Add an event listener.
036: *
037: * @param listener
038: * The listener to add.
039: */
040: public void addEventListener(WorkingMemoryEventListener listener);
041:
042: /**
043: * Remove an event listener.
044: *
045: * @param listener
046: * The listener to remove.
047: */
048: public void removeEventListener(WorkingMemoryEventListener listener);
049:
050: /**
051: * Returns all event listeners.
052: *
053: * @return listeners The listeners.
054: */
055: public List getWorkingMemoryEventListeners();
056:
057: /**
058: * Add an event listener.
059: *
060: * @param listener
061: * The listener to add.
062: */
063: public void addEventListener(AgendaEventListener listener);
064:
065: /**
066: * Remove an event listener.
067: *
068: * @param listener
069: * The listener to remove.
070: */
071: public void removeEventListener(AgendaEventListener listener);
072:
073: /**
074: * Returns all event listeners.
075: *
076: * @return listeners The listeners.
077: */
078: public List getAgendaEventListeners();
079:
080: /**
081: * Add an event listener.
082: *
083: * @param listener
084: * The listener to add.
085: */
086: public void addEventListener(RuleFlowEventListener listener);
087:
088: /**
089: * Remove an event listener.
090: *
091: * @param listener
092: * The listener to remove.
093: */
094: public void removeEventListener(RuleFlowEventListener listener);
095:
096: /**
097: * Returns all event listeners.
098: *
099: * @return listeners The listeners.
100: */
101: public List getRuleFlowEventListeners();
102: }
|