File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Whizlabs question on Proxy Design Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Whizlabs question on Proxy Design Pattern" Watch "Whizlabs question on Proxy Design Pattern" New topic
Author

Whizlabs question on Proxy Design Pattern

Denise Advincula
Ranch Hand

Joined: Jan 01, 2007
Posts: 160
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?

Choices:
Firewall
Proxy
Adapter
Observer
Chain of Responsibility
Filter


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...
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

I wouldn't answer proxy either. I double checked the definition of proxy and see nothing that relates to this scenario.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Whizlabs question on Proxy Design Pattern