I believe  I have a misunderstanding of the way the Events are matched.

The below code snippet generates the following exception

case Event(streamConfig : Success[StreamConfig],req: Request) => {
      stay() using StreamConfigRetrieved(streamConfig.get,req.session) 
forMax(timeout)
    }
    case Event(dockConfig : Success[DockConfig], req: Request) => {
      stay() using DockConfigRetrieved(dockConfig.get,req.session) 
forMax(timeout)
    }


[akka://CityActorSpec/user/$$a] trafficland.commons.data.flycast.DockConfig 
cannot be cast to trafficland.commons.data.flycast.StreamConfig
java.lang.ClassCastException: trafficland.commons.data.flycast.DockConfig 
cannot be cast to trafficland.commons.data.flycast.StreamConfig

I've watched it take place in the debugger. The first event is matched but 
the Success(StreamConfig) is actually a Success(DockConfig)

Can we not match on generic traits?

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to