Jump to: navigation, search

Chain of Responsibility

686 bytes added, 16:30, 2 April 2007
no edit summary
== Drawbacks ==
* '''Unhandled requests'''**Unfortunately, the Chain doesn't guarantee that every command is handled, which makes the problem worse, since unhandled commands propagate through the full length of the chain, slowing down the application. One way to solve this is by checking if, at the end of the chain, the request has been handled at least once, otherwise we will have to implement handlers for all the possible requests that may appear.
*'''Broken Chain'''
**Sometimes we could forget to include in the implementation of the handleRequest method the call to the successor, causing a break in the chain. The request isn’t sent forward from the broken link and so it ends up unhandled.

Navigation menu