Right now they essentially just parse out a single serialized entity to a java implementation with business logic, and it is hard coded that this happens per entity name or canonical type. This is a natural pattern, however it would be more flexible to just pass a factory and let this decide how it gets you a notification or document event back, which allows for more parsing options other than just by entity name. This is occasionally useful, and either way probably results in cleaner code.
Right now they essentially just parse out a single serialized entity to a java implementation with business logic, and it is hard coded that this happens per entity name or canonical type. This is a natural pattern, however it would be more flexible to just pass a factory and let this decide how it gets you a notification or document event back, which allows for more parsing options other than just by entity name. This is occasionally useful, and either way probably results in cleaner code.