compiles now. webid
authorHenry Story <henry.story@bblfish.net>
Sat, 22 Oct 2011 17:40:53 +0200
branchwebid
changeset 94 f43eb2e7d07c
parent 93 a87106f1ace0
child 95 cb2e2de87900
compiles now.
src/main/scala/ReadWriteWebMain.scala
src/main/scala/auth/X509view.scala
src/main/scala/netty/ReadWriteWebNetty.scala
--- a/src/main/scala/ReadWriteWebMain.scala	Sat Oct 22 15:56:21 2011 +0200
+++ b/src/main/scala/ReadWriteWebMain.scala	Sat Oct 22 17:40:53 2011 +0200
@@ -107,7 +107,7 @@
         ctx.resources(ClasspathUtils.fromClasspath("public/").toURI.toURL)
     }.
       filter(app.plan).
-      filter(new X509view().intent[HttpServletRequest,HttpServletResponse]).
+//      filter(new X509view().intent[HttpServletRequest,HttpServletResponse]).
       filter(new EchoPlan().plan).run()
     
   }
--- a/src/main/scala/auth/X509view.scala	Sat Oct 22 15:56:21 2011 +0200
+++ b/src/main/scala/auth/X509view.scala	Sat Oct 22 17:40:53 2011 +0200
@@ -36,9 +36,11 @@
  * @created: 13/10/2011
  */
 
-class X509view()(implicit val webCache: WebCache) {
+trait X509view[A,B]  {
+   implicit def wc: WebCache
+   implicit def man: Manifest[A]
 
-    def intent[A: Manifest,B]: Cycle.Intent[A, B] =  {
+    def intent: Cycle.Intent[A, B] =  {
       case req @ Path(path) if path startsWith "/test/auth/x509" =>
         Ok ~> ContentType("text/html") ~> Html(
           <html><head><title>Authentication Page</title></head>
--- a/src/main/scala/netty/ReadWriteWebNetty.scala	Sat Oct 22 15:56:21 2011 +0200
+++ b/src/main/scala/netty/ReadWriteWebNetty.scala	Sat Oct 22 17:40:53 2011 +0200
@@ -27,7 +27,8 @@
 import scala.Console._
 import org.w3.readwriteweb.auth.{X509view, RDFAuthZ}
 import org.w3.readwriteweb._
-import unfiltered.netty.{ServerErrorResponse, cycle}
+import unfiltered.netty.{ReceivedMessage, ServerErrorResponse, cycle}
+import org.jboss.netty.handler.codec.http.HttpResponse
 
 /**
  * ReadWrite Web for Netty server, allowing content renegotiation
@@ -36,7 +37,7 @@
  * @created: 21/10/2011
  */
 
-class ReadWriteWebNetty extends ReadWriteWebArgs {
+object ReadWriteWebNetty extends ReadWriteWebArgs {
 
   // regular Java main
    def main(args: Array[String]) {
@@ -65,6 +66,14 @@
      service.plan( new tmp ).run()
      
    }
-  
-   class tmp extends cycle.Plan with ServerErrorResponse
-}
\ No newline at end of file
+
+  class tmp extends  cycle.Plan  with cycle.ThreadPool with ServerErrorResponse with tmp2
+
+  trait tmp2 extends X509view[ReceivedMessage,HttpResponse] {
+    def wc = webCache
+    def man = manifest[ReceivedMessage]
+
+  }
+
+}
+