jargon

Design patterns·Who calls whom, and when

the request went to the first handler, which passed it on, and somewhere down the line something answered it.

Chain of responsibility

Also calledchain of responsibility pattern, handler chain, responsibility chain

Passing a request along a sequence of handlers until one of them deals with it, so the sender does not know which will. HTTP middleware stacks, servlet filters and event bubbling in the DOM are all this pattern. Its characteristic failure is silence: if no handler takes the request, nothing happens and nothing says so, which is why a terminal handler that raises is nearly always worth adding.

Commonly confused with