play.server
Class PlayHandler

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by play.server.PlayHandler
All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler
Direct Known Subclasses:
SslPlayHandler

public class PlayHandler
extends org.jboss.netty.channel.SimpleChannelUpstreamHandler


Nested Class Summary
 class PlayHandler.NettyInvocation
           
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
PlayHandler()
           
 
Method Summary
protected static void addToRequest(org.jboss.netty.handler.codec.http.HttpRequest nettyRequest, Http.Request request)
           
protected static void addToResponse(Http.Response response, org.jboss.netty.handler.codec.http.HttpResponse nettyResponse)
           
static void copyResponse(org.jboss.netty.channel.ChannelHandlerContext ctx, Http.Request request, Http.Response response, org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
           
 void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)
           
protected static java.util.Map<java.lang.String,java.lang.Object> getBindingForErrors(java.lang.Exception e, boolean isError)
           
static boolean isKeepAlive(org.jboss.netty.handler.codec.http.HttpMessage message)
           
static boolean isModified(java.lang.String etag, long last, org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
           
 void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
           
static Http.Request parseRequest(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
           
 Http.Request processRequest(Http.Request request)
           
static void serve404(NotFound e, org.jboss.netty.channel.ChannelHandlerContext ctx, Http.Request request, org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
           
static void serve500(java.lang.Exception e, org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
           
static void serveStatic(RenderStatic renderStatic, org.jboss.netty.channel.ChannelHandlerContext ctx, Http.Request request, Http.Response response, org.jboss.netty.handler.codec.http.HttpRequest nettyRequest, org.jboss.netty.channel.MessageEvent e)
           
static void setContentLength(org.jboss.netty.handler.codec.http.HttpMessage message, long contentLength)
           
protected static void writeResponse(org.jboss.netty.channel.ChannelHandlerContext ctx, Http.Response response, org.jboss.netty.handler.codec.http.HttpResponse nettyResponse, org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
           
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayHandler

public PlayHandler()
Method Detail

processRequest

public Http.Request processRequest(Http.Request request)

messageReceived

public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.MessageEvent e)
                     throws java.lang.Exception
Overrides:
messageReceived in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
java.lang.Exception

addToResponse

protected static void addToResponse(Http.Response response,
                                    org.jboss.netty.handler.codec.http.HttpResponse nettyResponse)

writeResponse

protected static void writeResponse(org.jboss.netty.channel.ChannelHandlerContext ctx,
                                    Http.Response response,
                                    org.jboss.netty.handler.codec.http.HttpResponse nettyResponse,
                                    org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)

copyResponse

public static void copyResponse(org.jboss.netty.channel.ChannelHandlerContext ctx,
                                Http.Request request,
                                Http.Response response,
                                org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
                         throws java.lang.Exception
Throws:
java.lang.Exception

parseRequest

public static Http.Request parseRequest(org.jboss.netty.channel.ChannelHandlerContext ctx,
                                        org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

addToRequest

protected static void addToRequest(org.jboss.netty.handler.codec.http.HttpRequest nettyRequest,
                                   Http.Request request)

exceptionCaught

public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.ExceptionEvent e)
                     throws java.lang.Exception
Overrides:
exceptionCaught in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
java.lang.Exception

serve404

public static void serve404(NotFound e,
                            org.jboss.netty.channel.ChannelHandlerContext ctx,
                            Http.Request request,
                            org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)

getBindingForErrors

protected static java.util.Map<java.lang.String,java.lang.Object> getBindingForErrors(java.lang.Exception e,
                                                                                      boolean isError)

serve500

public static void serve500(java.lang.Exception e,
                            org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)

serveStatic

public static void serveStatic(RenderStatic renderStatic,
                               org.jboss.netty.channel.ChannelHandlerContext ctx,
                               Http.Request request,
                               Http.Response response,
                               org.jboss.netty.handler.codec.http.HttpRequest nettyRequest,
                               org.jboss.netty.channel.MessageEvent e)

isModified

public static boolean isModified(java.lang.String etag,
                                 long last,
                                 org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)

isKeepAlive

public static boolean isKeepAlive(org.jboss.netty.handler.codec.http.HttpMessage message)

setContentLength

public static void setContentLength(org.jboss.netty.handler.codec.http.HttpMessage message,
                                    long contentLength)


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