01: package org.drools.ruleflow.core;
02:
03: /*
04: * Copyright 2005 JBoss Inc
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: /**
20: * Represents a join node in a RuleFlow.
21: * A join is a special kind of node with multiple incoming connections and
22: * one outgoing connection. The type of join decides when the outgoing
23: * connections will be triggered (based on which incoming connections have
24: * been triggered).
25: *
26: * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
27: */
28: public interface Join extends Node {
29:
30: int TYPE_UNDEFINED = 0;
31: /**
32: * The outgoing connection of a join of this type is triggered
33: * when all its incoming connections have been triggered.
34: */
35: int TYPE_AND = 1;
36: /**
37: * The outgoing connection of a join of this type is triggered
38: * when one of its incoming connections has been triggered.
39: */
40: int TYPE_XOR = 2;
41:
42: /**
43: * Sets the type of the join.
44: *
45: * @param type The type of the join
46: * @throws IllegalArgumentException if type is null
47: */
48: void setType(int type);
49:
50: /**
51: * Returns the type of the join.
52: *
53: * @return the type of the join.
54: */
55: int getType();
56:
57: /**
58: * Convenience method for returning the outgoing connection of the join
59: *
60: * @return the outgoing connection of the join
61: */
62: Connection getTo();
63:
64: }
|