the command pattern used in this article has been simplified for clarity 本文中使用到的command模式为达到清楚明了,已作了一定的简化。
all business logic is encapsulated in command objects by applying the command pattern 所有的业务逻辑通过应用command模式来封装在command对象中。
normally, such listeners are specified as instances of anonymous inner classes using the command pattern 通常,这样的侦听器通过使用命令模式(commandpattern)被指定为匿名内部类的实例。
code that logs information to a file can be added to the execute operation of concretecommand in the command pattern 在command模式中,将信息记录到文件中的代码能够被添加到concretecommand的execute()操作。
so far, i ve looked at asynchronous request response using message queues and business logic encapsulation using the command pattern 迄今为止,我已经观察到可以使用消息队列来实现异步的请求或响应,以及使用command模式来实现商业逻辑封装。