37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
|
|
<html>
|
|
<head>
|
|
<link href='./_highlighter/SyntaxHighlighter.css' rel='stylesheet' type='text/css'/>
|
|
<script language='javascript' src='./_highlighter/shAll.js'></script>
|
|
</head>
|
|
<body>
|
|
<pre name="code" class="scala" style="width:100%">
|
|
/**
|
|
* Copyright (C) 2009 Scalable Solutions.
|
|
*/
|
|
|
|
package se.scalablesolutions.akka.rest
|
|
|
|
import javax.ws.rs.core.Context
|
|
|
|
import com.sun.jersey.core.spi.component.ioc.{IoCComponentProvider,IoCComponentProviderFactory}
|
|
import com.sun.jersey.core.spi.component.{ComponentContext}
|
|
|
|
import config.Configurator
|
|
import util.Logging
|
|
|
|
class ActorComponentProviderFactory(val configurators: List[Configurator])
|
|
extends IoCComponentProviderFactory with Logging {
|
|
override def getComponentProvider(clazz: Class[_]): IoCComponentProvider = getComponentProvider(null, clazz)
|
|
|
|
override def getComponentProvider(context: ComponentContext, clazz: Class[_]): IoCComponentProvider = {
|
|
configurators.find(_.isDefined(clazz)).map(_ => new ActorComponentProvider(clazz, configurators)).getOrElse(null)
|
|
}
|
|
}
|
|
</pre>
|
|
<script language='javascript'>
|
|
dp.SyntaxHighlighter.ClipboardSwf = './_highlighter/clipboard.swf';
|
|
dp.SyntaxHighlighter.HighlightAll('code');
|
|
</script>
|
|
</body>
|
|
</html>
|