Wednesday, May 21, 2014

Protection Proxy Pattern in Java


Simple Note

(From Reference)
Protective Proxy – The protective proxy acts as an authorisation layer to verify if the actual user has access to appropriate content. An example can be thought about the proxy server which provides restrictive internet access in office. Only the websites and contents which are valid will be allowed and the remaining ones will be blocked.

Program

https://github.com/benbai123/JSP_Servlet_Practice/tree/master/Practice/JAVA/DesignPattern/src/proxy/protectionproxy

Run TestMain.java to test.

ProxyMouseController will check role first then control mouse via RealMouseController

Reference:

Gang of Four – Proxy Design Pattern

No comments:

Post a Comment