Chapter 5 ¶
Behavioral Patterns ¶
Chain of Responsibility(225) Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects, and pass the request along the chain until an object handles it.
Command(245) Encapsulate a request or operation as an object, thereby letting you parameterize clients with different operations, queue or log requests, and support undoable operations.
Interpreter(261)
Chain of Responsibility(225)
Command(245) λ μμ²(request)μ΄λ λͺ
λ Ή(operation)μ objectλ‘μ μΊ‘μνμν¨λ€. κ·Έλ¬ν¨μΌλ‘μ¨ κ°κ° λ€λ₯Έ λͺ
λ Ήμ κ°μ§ ν΄λΌμ΄μΈνΈλ€μ νλΌλ―Έν°ν μν€κ³ , μμ²λ€μ queueμ μκ±°λ μ λ ¬νλ©°, μ·¨μκ°λ₯νννμ λͺ
λ Ήλ€μ μ§μνλ€.