From e136e6a47b057115b7ddcc1ad6a5362346263cba Mon Sep 17 00:00:00 2001 From: Ilkka Seppala Date: Sat, 4 Apr 2015 21:10:12 +0300 Subject: [PATCH] Corrected merge error where CyclicBarrier example had moved under Intercepting Filter. Should be under Callback. --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5333ac3c3..0a0bbf441 100644 --- a/README.md +++ b/README.md @@ -437,6 +437,8 @@ Presentation Tier patterns are the top-most level of the application, this is co **Applicability:** Use the Callback pattern when * When some arbitrary synchronous or asynchronous action must be performed after execution of some defined activity. +**Real world examples:** +* [CyclicBarrier] (http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CyclicBarrier.html#CyclicBarrier%28int,%20java.lang.Runnable%29) constructor can accept callback that will be triggered every time when barrier is tripped. ## Intercepting Filter [↑](#list-of-design-patterns) **Intent:** Provide pluggable filters to conduct necessary pre-processing and post-processing to requests from a client to a target @@ -448,9 +450,6 @@ Presentation Tier patterns are the top-most level of the application, this is co * a system should do the authentication/ authorization/ logging or tracking of request and then pass the requests to corresponding handlers * you want a modular approach to configuring pre-processing and post-processing schemes -**Real world examples:** -* [CyclicBarrier] (http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CyclicBarrier.html#CyclicBarrier%28int,%20java.lang.Runnable%29) constructor can accept callback that will be triggered every time when barrier is tripped. - ## Execute Around [↑](#list-of-design-patterns) **Intent:** Execute Around idiom frees the user from certain actions that should always be executed before and after the business method. A good example of this is resource allocation and deallocation leaving the user to specify only what to do with the resource.