I hereby claim:
- I am jboner on github.
- I am jonas (https://keybase.io/jonas) on keybase.
- I have a public key ASB-dCL3b2wk3TzgiVeoHmmp_s-ZM004MVmlztARjGu-pAo
To claim this, I am signing this object:
<!-- Example of Akka/Spring integration --> | |
<beans> | |
<!-- Create an active object --> | |
<akka:active-object id="myActiveObject" | |
target="com.biz.MyPOJO" | |
transactional="true" | |
timeout="1000" /> | |
import java.util.zip._ | |
import java.io._ | |
class InMemZip(compressionLevel: Int) { | |
private val _outBytes = new ByteArrayOutputStream | |
private val _zipOutStream = { | |
val s = new ZipOutputStream(_outBytes) | |
s.setLevel(compressionLevel) | |
s | |
} |
// Shutdown HawtDispatch GlobalQueue | |
org.fusesource.hawtdispatch.ScalaDispatch.globalQueue.asInstanceOf[org.fusesource.hawtdispatch.internal.GlobalDispatchQueue].shutdown | |
// Clear Thread.subclassAudits | |
val tf = classOf[java.lang.Thread].getDeclaredField("subclassAudits") | |
tf.setAccessible(true) | |
val subclassAudits = tf.get(null).asInstanceOf[java.util.Map[_,_]] | |
subclassAudits.synchronized {subclassAudits.clear} | |
// Clear and reset j.u.l.Level.known (due to Configgy) |
import scala.collection.mutable.ListBuffer | |
import akka.actor.{Actor,ActorRef} | |
import akka.actor.Actor._ | |
import akka.routing.{ Listeners, Listen } | |
//Represents a domain event | |
trait Event | |
//A builder to create domain entities | |
trait EntityBuilder[Entity] { |
jboner at sarek in ~/src/akka-stuff/akka on master | |
[130] $ cloc . 5244 text files. | |
2647 unique files. | |
3822 files ignored. | |
http://cloc.sourceforge.net v 1.56 T=52.0 s (41.8 files/s, 13040.5 lines/s) | |
-------------------------------------------------------------------------------- | |
Language files blank comment code | |
-------------------------------------------------------------------------------- | |
HTML 1473 39655 1 529371 |
import akka.actor._ | |
import akka.actor.SupervisorStrategy._ | |
import scala.concurrent.duration._ | |
// Coffee types | |
trait CoffeeType | |
case object BlackCoffee extends CoffeeType | |
case object Latte extends CoffeeType | |
case object Espresso extends CoffeeType |
case class MyMessage(val id: String, val value: Tuple2[String, Int]) extends ScalaJSON | |
val message = MyMessage("id", ("hello", 34)) | |
val json = message.toJSON | |
val messageCopy = Serializer.ScalaJSON.in(json) |
import akka.actor._ | |
import java.net.InetSocketAddress | |
import akka.util.ByteString | |
class SimpleClient(destAddress: InetSocketAddress) extends Actor { | |
val socket = IOManager(context.system) connect (destAddress) | |
val state = IO.IterateeRef.sync() |
lost(arg, function(err, result) { | |
if(err) return console.log(err); | |
In(result, function(err, result) { | |
if(err) return console.log(err); | |
callback(result, function(err, result) { | |
if(err) return console.log(err); | |
hell(result); | |
}); | |
}); | |
}); |
I hereby claim:
To claim this, I am signing this object: