Package play.server
Class PlayHandler
- java.lang.Object
-
- org.jboss.netty.channel.SimpleChannelUpstreamHandler
-
- play.server.PlayHandler
-
- All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler,org.jboss.netty.channel.ChannelUpstreamHandler
public class PlayHandler extends org.jboss.netty.channel.SimpleChannelUpstreamHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPlayHandler.NettyInvocation
-
Field Summary
Fields Modifier and Type Field Description java.util.Map<java.lang.String,org.jboss.netty.channel.ChannelHandler>pipelinesThe Pipeline is given for a PlayHandler
-
Constructor Summary
Constructors Constructor Description PlayHandler(Invoker invoker, ActionInvoker actionInvoker)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidaddToResponse(Http.Response response, org.jboss.netty.handler.codec.http.HttpResponse nettyResponse)voidcloseChunked(Http.Response playResponse)voidcopyResponse(org.jboss.netty.channel.ChannelHandlerContext ctx, Http.Request request, Http.Response response, org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)voidexceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)protected static java.util.Map<java.lang.String,Http.Cookie>getCookies(org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)protected static java.util.Map<java.lang.String,Http.Header>getHeaders(org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)static booleanisKeepAlive(org.jboss.netty.handler.codec.http.HttpMessage message)static booleanisModified(java.lang.String etag, long last, org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)voidmessageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent messageEvent)Http.RequestparseRequest(org.jboss.netty.handler.codec.http.HttpRequest nettyRequest, org.jboss.netty.channel.MessageEvent messageEvent)voidserve500(java.lang.Exception e, org.jboss.netty.channel.ChannelHandlerContext ctx)voidserveStatic(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 voidsetContentLength(org.jboss.netty.handler.codec.http.HttpMessage message, long contentLength)voidwriteChunk(Http.Request playRequest, Http.Response playResponse, org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.handler.codec.http.HttpRequest nettyRequest, java.lang.Object chunk)protected static voidwriteResponse(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)
-
-
-
Constructor Detail
-
PlayHandler
public PlayHandler(Invoker invoker, ActionInvoker actionInvoker)
-
-
Method Detail
-
messageReceived
public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent messageEvent)- Overrides:
messageReceivedin classorg.jboss.netty.channel.SimpleChannelUpstreamHandler
-
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 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 Http.Request parseRequest(org.jboss.netty.handler.codec.http.HttpRequest nettyRequest, org.jboss.netty.channel.MessageEvent messageEvent) throws java.io.IOException
- Throws:
java.io.IOException
-
getHeaders
protected static java.util.Map<java.lang.String,Http.Header> getHeaders(org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
-
getCookies
protected static java.util.Map<java.lang.String,Http.Cookie> getCookies(org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
-
exceptionCaught
public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)- Overrides:
exceptionCaughtin classorg.jboss.netty.channel.SimpleChannelUpstreamHandler
-
serve500
public void serve500(java.lang.Exception e, org.jboss.netty.channel.ChannelHandlerContext ctx)
-
serveStatic
public 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)
-
writeChunk
public void writeChunk(Http.Request playRequest, Http.Response playResponse, org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.handler.codec.http.HttpRequest nettyRequest, java.lang.Object chunk)
-
closeChunked
public void closeChunked(Http.Response playResponse)
-
-