Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Akka on JRuby
gem "jbundler"
source "http://repo.typesafe.com/typesafe/releases/"
jar "com.typesafe.akka:akka-actor", "2.0.2"
require "bundler/setup"
require "jbundler"
require "java"
java_import "akka.actor.ActorSystem"
java_import "akka.actor.UntypedActor"
java_import "akka.actor.UntypedActorFactory"
java_import "akka.actor.Props"
class Someone < UntypedActor
def onReceive(message)
puts "onReceive: #{message}"
getContext.system.shutdown
sleep 1
puts "Close"
end
end
class SomeoneFactory
java_implements UntypedActorFactory
def create
Someone.new
end
end
system = ActorSystem.apply("test-system")
someone = system.actorOf(Props.new(SomeoneFactory.new))
someone.tell "hello"
system.awaitTermination
@albertoperdomo

buena mierda :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.