play.server
类 PlayHandler
java.lang.Object
org.jboss.netty.channel.SimpleChannelUpstreamHandler
play.server.PlayHandler
- 所有已实现的接口:
- org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler
- 直接已知子类:
- SslPlayHandler
public class PlayHandler
- extends org.jboss.netty.channel.SimpleChannelUpstreamHandler
从接口 org.jboss.netty.channel.ChannelHandler 继承的嵌套类/接口 |
org.jboss.netty.channel.ChannelHandler.Sharable |
方法摘要 |
protected static void |
addToResponse(Http.Response response,
org.jboss.netty.handler.codec.http.HttpResponse nettyResponse)
|
void |
channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e)
|
void |
closeChunked(Http.Request playRequest,
Http.Response playResponse,
org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
|
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)
|
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 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 messageEvent)
|
Http.Request |
parseRequest(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.handler.codec.http.HttpRequest nettyRequest,
org.jboss.netty.channel.MessageEvent messageEvent)
|
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)
|
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)
|
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)
|
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)
|
从类 org.jboss.netty.channel.SimpleChannelUpstreamHandler 继承的方法 |
channelBound, channelClosed, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete |
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlayHandler
public PlayHandler()
messageReceived
public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent messageEvent)
throws java.lang.Exception
- 覆盖:
- 类
org.jboss.netty.channel.SimpleChannelUpstreamHandler
中的 messageReceived
- 抛出:
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 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
- 抛出:
java.lang.Exception
parseRequest
public Http.Request parseRequest(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.handler.codec.http.HttpRequest nettyRequest,
org.jboss.netty.channel.MessageEvent messageEvent)
throws java.lang.Exception
- 抛出:
java.lang.Exception
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)
throws java.lang.Exception
- 覆盖:
- 类
org.jboss.netty.channel.SimpleChannelUpstreamHandler
中的 exceptionCaught
- 抛出:
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 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.Request playRequest,
Http.Response playResponse,
org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.handler.codec.http.HttpRequest nettyRequest)
channelDisconnected
public void channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e)
throws java.lang.Exception
- 覆盖:
- 类
org.jboss.netty.channel.SimpleChannelUpstreamHandler
中的 channelDisconnected
- 抛出:
java.lang.Exception
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly