design - In chain of responsibility, why a sub class has to come back to its predecessor? -


to make question better, lets have example.

suppose have base class base , 3 derived classes named: derived1, derived2, , derived3.

so per chain of responsibility pattern, if derived1 not able handle request, pass request base , base send request derived2 , on.

my question : why derived1 have pass request base? instead, can directly pass derived2 , on?

can derived1 try handle request , if not pass dereved2 , if still not handled, can pass derived3 bypassing base class?


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -