This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I tried to analyze this question multiple times and I still didn't get why the answer is proxy... I've always answered Chain of Responsibility here but well, it's wrong. Any thoughts?
You are currently designing your own Desktop Publishing application as you have not found any existing application that does exactly what you want. As part of the design, you are using a Controller to which you send all GUI requests. Not all objects can process the same commands.
For example, you cannot select the spell check tool when an image has the focus. To stop any possible errors, you would like to filter out some of the messages as they are passed from these objects to the Controller object. What pattern could you use?
Chain of Responsibility
At one read, I'll also answer it with Intercepting Filter but it's not in the choices. So.. in this particular scenario, where is the proxy object?
SCJP/OCPJP 6 | SCWCD/OCPJWCD 5 | OCMJEA in progress...