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

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -