intel-hadoop/gearpump — pull request #87 by kkasravi (2014-10-14 22:51:19+00:00)
Title: Allows a TaskActor to get type specific messages into it's next[T](t:T) method

This uses a Typeclass Handler[T] found in TaskActor to get specific types into a TaskActor's next[T](t:T) method. These types are the Message.msg type which is defined to be ```<: java.io.Serializable```. A TaskActor must mix in MessageHandler[T] and define def next(t:T). For example:
```
class SOLBolt(conf : Configs) extends TaskActor(conf : Configs) with MessageHandler[Baz] {
...
def next(baz: Baz): Unit = {...}
}
```
Additionally the TaskActor must include an implicit TypeClass like to following
```
object SOLBolt {
implicit object SOLBazHandler extends Handler[Baz](
{
case b:Baz =>
b
}
)
}
```
A restriction is the TaskActor can't define multiple ```def next(t:T)``` methods if this particular TaskActor expects a variety of different types. This could probably be improved upon and should perhaps just deal with JSON types between TaskActor's.