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()
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()
handleRequest
in interface Handler<Rule>
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