play.server
Class HttpHandler

java.lang.Object
  extended by play.server.HttpHandler
All Implemented Interfaces:
org.apache.mina.common.IoHandler

public class HttpHandler
extends java.lang.Object
implements org.apache.mina.common.IoHandler

HTTP Handler


Constructor Summary
HttpHandler()
           
 
Method Summary
static void attachFile(org.apache.mina.common.IoSession session, org.apache.asyncweb.common.MutableHttpResponse response, VirtualFile file)
           
 void exceptionCaught(org.apache.mina.common.IoSession session, java.lang.Throwable cause)
           
static boolean isModified(java.lang.String etag, long last, org.apache.asyncweb.common.HttpRequest request)
           
 void messageReceived(org.apache.mina.common.IoSession session, java.lang.Object message)
           
 void messageSent(org.apache.mina.common.IoSession session, java.lang.Object message)
           
static Http.Request parseRequest(org.apache.asyncweb.common.MutableHttpRequest minaRequest, org.apache.mina.common.IoSession session)
           
static void serve404(org.apache.mina.common.IoSession session, org.apache.asyncweb.common.MutableHttpResponse minaResponse, org.apache.asyncweb.common.HttpRequest minaRequest, NotFound e)
           
static void serve500(java.lang.Exception e, org.apache.mina.common.IoSession session, org.apache.asyncweb.common.HttpRequest request, org.apache.asyncweb.common.MutableHttpResponse response)
           
static void serveStatic(org.apache.mina.common.IoSession session, org.apache.asyncweb.common.MutableHttpResponse minaResponse, org.apache.asyncweb.common.MutableHttpRequest minaRequest, RenderStatic renderStatic)
           
 void sessionClosed(org.apache.mina.common.IoSession session)
           
 void sessionCreated(org.apache.mina.common.IoSession session)
           
 void sessionIdle(org.apache.mina.common.IoSession session, org.apache.mina.common.IdleStatus status)
           
 void sessionOpened(org.apache.mina.common.IoSession session)
           
static void writeResponse(org.apache.mina.common.IoSession session, org.apache.asyncweb.common.HttpRequest req, org.apache.asyncweb.common.MutableHttpResponse res)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpHandler

public HttpHandler()
Method Detail

messageReceived

public void messageReceived(org.apache.mina.common.IoSession session,
                            java.lang.Object message)
                     throws java.lang.Exception
Specified by:
messageReceived in interface org.apache.mina.common.IoHandler
Throws:
java.lang.Exception

parseRequest

public static Http.Request parseRequest(org.apache.asyncweb.common.MutableHttpRequest minaRequest,
                                        org.apache.mina.common.IoSession session)
                                 throws java.io.IOException
Throws:
java.io.IOException

exceptionCaught

public void exceptionCaught(org.apache.mina.common.IoSession session,
                            java.lang.Throwable cause)
                     throws java.lang.Exception
Specified by:
exceptionCaught in interface org.apache.mina.common.IoHandler
Throws:
java.lang.Exception

messageSent

public void messageSent(org.apache.mina.common.IoSession session,
                        java.lang.Object message)
                 throws java.lang.Exception
Specified by:
messageSent in interface org.apache.mina.common.IoHandler
Throws:
java.lang.Exception

sessionClosed

public void sessionClosed(org.apache.mina.common.IoSession session)
                   throws java.lang.Exception
Specified by:
sessionClosed in interface org.apache.mina.common.IoHandler
Throws:
java.lang.Exception

sessionCreated

public void sessionCreated(org.apache.mina.common.IoSession session)
                    throws java.lang.Exception
Specified by:
sessionCreated in interface org.apache.mina.common.IoHandler
Throws:
java.lang.Exception

sessionIdle

public void sessionIdle(org.apache.mina.common.IoSession session,
                        org.apache.mina.common.IdleStatus status)
                 throws java.lang.Exception
Specified by:
sessionIdle in interface org.apache.mina.common.IoHandler
Throws:
java.lang.Exception

sessionOpened

public void sessionOpened(org.apache.mina.common.IoSession session)
                   throws java.lang.Exception
Specified by:
sessionOpened in interface org.apache.mina.common.IoHandler
Throws:
java.lang.Exception

attachFile

public static void attachFile(org.apache.mina.common.IoSession session,
                              org.apache.asyncweb.common.MutableHttpResponse response,
                              VirtualFile file)
                       throws java.io.IOException
Throws:
java.io.IOException

serveStatic

public static void serveStatic(org.apache.mina.common.IoSession session,
                               org.apache.asyncweb.common.MutableHttpResponse minaResponse,
                               org.apache.asyncweb.common.MutableHttpRequest minaRequest,
                               RenderStatic renderStatic)

serve404

public static void serve404(org.apache.mina.common.IoSession session,
                            org.apache.asyncweb.common.MutableHttpResponse minaResponse,
                            org.apache.asyncweb.common.HttpRequest minaRequest,
                            NotFound e)

serve500

public static void serve500(java.lang.Exception e,
                            org.apache.mina.common.IoSession session,
                            org.apache.asyncweb.common.HttpRequest request,
                            org.apache.asyncweb.common.MutableHttpResponse response)

isModified

public static boolean isModified(java.lang.String etag,
                                 long last,
                                 org.apache.asyncweb.common.HttpRequest request)

writeResponse

public static void writeResponse(org.apache.mina.common.IoSession session,
                                 org.apache.asyncweb.common.HttpRequest req,
                                 org.apache.asyncweb.common.MutableHttpResponse res)


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly