November 2018
Intermediate to advanced
388 pages
9h 5m
English
Consider audit messages for different identity types, including Person, Group, Organization, and Device. These identities will have different audit messages and must be handled separately. Keeping all audit-related code in a single class increases the overhead when we want to add audits for new identities.
The chain-of-responsibility pattern would be a good fit in this case. We will illustrate the chain of responsibility through this pattern, handling audits for different identities.
We will start with the Handler interface, which defines the contract for concrete handlers. Then we write an AbstractHandler. Some of the reusable code that can be used in the concrete implementation goes here. ...
Read now
Unlock full access