dimanche 15 janvier 2023

Design pattern for multiple handlers handling an object

My need:

I have an object and its to be processed in 3 stages. Depending on the object's data the handlers differ for all the three stages. Like one possible scenario will be handlerAStage1, handlerAStage2, handlerAStage3 will be executed, on the other case handlerBStage1, handlerBStage2, handlerBStage3 will be executed.

Can you suggest some best ways to implement this? Any resource will be helpful.

Aucun commentaire:

Enregistrer un commentaire