Q:

Scala akka : implement abstract class with subtype parameter

I have a problem with my design. I just want to do this but I cannot achieve it. Compilator complains about the process method not implemented in MyProcessor so MyProcessor should be abstract...
trait Event 

abstract class EventProcessor extends Actor{
    def receive ={
        case evt : Event => process(evt)
        case evts : Iterable[Event] => process(evts)
    }

    def process(event :Event): Iterable[SomeObject]

    def process(events :Iterable[Event])={
      events.flatMap(process)
    }
}

case class MyEvent extends Event

class MyProcessor extends Processor{
    def process(event :MyEvent)={
      some processing...
    }
}

I am pretty sure it's a well known pattern. What is your method ?
I need 2 things :

How to correctly implement subclass with type parameter (as decribe in first answer ?)
How to go through type erasure ?

EDIT : solution
trait Event 

abstract class EventProcessor[T<:Event:ClassTag] extends Actor{

    def receive ={
        case evt : T=> process(evt)
        case evts : Iterable[T] => process(evts)
    }

    def process(event :T): Iterable[SomeObject]

    def process(events :Iterable[T])={
      events.flatMap(process)
    }
}

case class MyEvent extends Event

class MyProcessor extends Processor[MyEvent]{
    def process(event :MyEvent)={
      some processing...
    }
}

A:

You need a type parameter:
abstract class EventProcessor[T <: Event] {
  def process(event: T)
}
class MyProcessor extends  Processor[MyEvent] {
  def process(event: MyEvent)
}

