Advertisement
Guest User

Untitled

a guest
Sep 19th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.59 KB | None | 0 0
  1. object WebClientActor extends Logging {
  2.   private var config: WebClientConfig = null
  3.   private lazy val pool = {
  4.     if(config == null)
  5.       throw new Exception("Attempt to use WebClientActor before configuration")
  6.     actorOf(new WebClientActorPool(config)).start()
  7.   }
  8.  
  9.   def initialize(webConfig: WebClientConfig) {
  10.     log.debug("Initializing WebClientActor with configs {}...", webConfig)
  11.     config = webConfig
  12.   }
  13.  
  14.   def ! (report: AnalyticsReport) { pool ! report }
  15.   def ! (request: ClientProxyRequest) { pool ! request }
  16.   def ! (request: FrameworkRequest) { pool ! request }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement