This presentation is part of the Design Pattern Series. Presentation explains the use of Command Pattern comparing it against a real life situation and then showcasing the Java implementation of the same.
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Design patterns - Command Pattern
1. QmPe
initiative
COMMAND PATTERN explained !
Prepared by Annamalai C
Copyright 2006-2011
2. Command Pattern in Real Life
AC has a Remote Controller. RemoteController acts as the Request Generator.
RemoteControl can raise 2 Requests ON and OFF. AC is the Receiver.
It receives the request, executes the command to ON or OFF based on the request.
nd
mma
O n Co
Request Off Command
Command Pattern is a Behavioral Pattern.
Copyright 2006-2011
4. Real Life vs Java Object
d
man
On Com
Off Command
Copyright 2006-2011
5. Real Life vs Java Object
Remote Controller
Copyright 2006-2011
6. How Command Pattern works in Real Life ?
AC has a Remote Controller. RemoteController acts as the Request Generator.
RemoteControl can raise 2 Requests ON and OFF. AC is the Receiver.
It receives the request, executes the command to ON or OFF based on the request.
nd
mma
O n Co
Request Off Command
Copyright 2006-2011