iGrind

Untitled

May 20th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.52 KB | None | 0 0
  1. case msg @ UpdateKeywordsConf(kwConfig)
  2.         log.warning("Update keywords config: {}", kwConfig)
  3.         keywordsConf = Some(kwConfig)
  4.  
  5.         unstashAll()
  6.         context.system.eventStream.publish(msg)
  7. ....
  8. ....
  9. ....
  10. override def preStart() {
  11.       context.become({
  12.         case kw: KeywordsConfig ⇒
  13.           updateKeywords(kw)
  14.  
  15.           context.unbecome()
  16.           unstashAll()
  17.  
  18.           context.system.eventStream.subscribe(self, classOf[UpdateKeywordsConf])
  19.  
  20.         case _ ⇒ stash()
  21.       })
Advertisement
Add Comment
Please, Sign In to add comment