RemoteActor and registration names

View: New views
1 Messages — Rating Filter:   Alert me  

RemoteActor and registration names

by Martin Lau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a RemoteActor which is registered with multiple names:

     val names = 'name0 :: 'name1 :: Nil

     val a = actor {
         RemoteActor.classLoader = getClass().getClassLoader()
         alive(1234)
         names.foreach(name => register(name, self))
         loop {
             react {
                 case msg => {
                     println(this + ": Received message '" + msg + "'")
                 }
             }
         }
     }

I'd like to be able to determine which name the incoming message was  
received on ('name0, 'name1, etc), but by the time the actor sees the  
message it's been decoupled from whatever transport is being used.

I've dug through the code and see things getting into the NetKernel  
but pretty quickly get lost from there... Any suggestions would be  
gratefully welcomed!

Martin