CommandBus
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: https://github.com/Ekhoo/CommandBus
软件介绍
一个轻量级的 Command Bus 的实现,用 Swift 编写。
使用:
{
"{CommandNameA}": "{CommandHandlerNameA}",
"{CommandNameB}": "{CommandHandlerNameB}",
"{CommandNameC}": "{CommandHandlerNameC}"
}class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
/*** Register to the Command event ***/
NSNotificationCenter.defaultCenter().addObserver(self, selector: "onCommandHandled:", name:"COMMAND_DONE", object: nil)
/*** Create the CommandBus ***/
let commandBus: CommandBus = CommandBus(configurationFileName: "configuration")!
/*** Create your own CommandHandler ***/
let customCommand: CustomCommand = CustomCommand()
/*** Send your commandHandler to the CommandBus with your event name ***/
commandBus.handle(command: customCommand, commandHandledEvent: "COMMAND_DONE")
}
func onCommandHandled(notification: NSNotification) {
/*** This method is called when the CommandHandler have done ***/
print("Command Handled: \(notification.object!)")
}
}JAVA核心技术(卷1)
Cay S. Horstmann、Gary Cornell / 杜永萍、邝劲筠、叶乃文 / 机械工业出版社 / 2008-6 / 98.00元
《JAVA核心技术(卷1):基础知识(原书第8版)》是《Java核心技术》的最新版,《Java核心技术》出版以来一直畅销不衰,深受读者青睐,每个新版本都尽可能快地跟上Java开发工具箱发展的步伐,而且每一版都重新改写了的部分内容,以便适应Java的最新特性。本版也不例外,它反遇了Java SE6的新特性。全书共14章,包括Java基本的程序结构、对象与类、继承、接口与内部类、图形程序设计、事件处理......一起来看看 《JAVA核心技术(卷1)》 这本书的介绍吧!
