Constructor and Description |
---|
RuleHandler(Rule rule) |
Modifier and Type | Method and Description |
---|---|
Rule |
getDelegate()
Get the delegate: the object contained within the handler implementation.
|
java.util.Optional<Handler<Rule>> |
getSuccessor()
Gets the successor in the chain.
|
void |
handleRequest(java.lang.Object obj)
Invokes the current Rule's action and then moves down the chain to the successor
if the RuleState of the current Rule is next or the action(s) was not executed.
|
Handler<Rule> |
setSuccessor(Handler<Rule> successor)
Sets the next Handler in the chain.
|
public RuleHandler(Rule rule)
public void handleRequest(java.lang.Object obj)
handleRequest
in interface Handler<Rule>
obj
- facts to be applied to the request (rule invocation)public Rule getDelegate()
Handler
getDelegate
in interface Handler<Rule>
public java.util.Optional<Handler<Rule>> getSuccessor()
Handler
getSuccessor
in interface Handler<Rule>
public Handler<Rule> setSuccessor(Handler<Rule> successor)
Handler
setSuccessor
in interface Handler<Rule>
successor
- the Handler to set as the next in the chain