通过Typesafe Activator创建akka java sample
2015-05-30 16:03
337 查看
通过Typesafe Activator创建akka java sample
What is Typesafe Activator?
Typesafe Activator gets you started with the Typesafe Reactive Platform, including Akka, Play Framework and Scala. It is a hub for developers that want to build reactive applications, providing an
in browser environment for creating new applications.
首先安装Typesafe Activator,然后启动它,如下所示,找到该模板,创建项目,
根据这个例子,为了简单,做了一些修改。
实现HelloWorld的actor,这个actor的作用就是发出问候消息,并且接收MSG.DONE的消息,处理之,如下,
?
然后相应的Greeter的actor接收问候消息,然后打印,然后向其消息的发送者发送DONE的消息,如下,
?
这是两个actor的交互行为,在引入第三个actor,负责监视HelloWorld的actor,当其发出Terminated的消息时,这个负责监视的actor会处理之,如下,
?
下面就是启动类,如下,
?
========================================END========================================
from http://my.oschina.net/xinxingegeya/blog/364720
What is Typesafe Activator?
Typesafe Activator gets you started with the Typesafe Reactive Platform, including Akka, Play Framework and Scala. It is a hub for developers that want to build reactive applications, providing an
in browser environment for creating new applications.
首先安装Typesafe Activator,然后启动它,如下所示,找到该模板,创建项目,
根据这个例子,为了简单,做了一些修改。
实现HelloWorld的actor,这个actor的作用就是发出问候消息,并且接收MSG.DONE的消息,处理之,如下,
?
?
?
?
from http://my.oschina.net/xinxingegeya/blog/364720
相关文章推荐
- Eclipse去除js(JavaScript)验证错误
- weak reference - 1
- JS验证代码时字母或者数字
- JS之——回调函数的简单应用(插曲)
- [LeetCode][JavaScript]Reverse Linked List
- HTML基础 DOM概览(第一天)
- javascript基础(第五天)
- javascript基础(第四天)
- Jquery.Page.js 分页插件的使用
- javascript基础(第三天)
- javascript基础(第二天)
- ./scripts/feeds update -a OpenWrt大招系列
- 2W+汉字转拼音JS字库(UTF-8生僻字等通用无乱码)
- [LeetCode][JavaScript]Contains Duplicate II
- javascript基础(第一天)
- JQuery给网页更换皮肤的方法
- jQuery Validate (登录页面相关验证)
- LeetCode --- Remove Nth Node From End of List
- CSS3 box-shadow(阴影使用)
- jQuery实现给页面换肤的方法