org.jboss.netty.handler.codec.http
Class HttpServerCodec

java.lang.Object
  extended by org.jboss.netty.handler.codec.http.HttpServerCodec
All Implemented Interfaces:
ChannelDownstreamHandler, ChannelHandler, ChannelUpstreamHandler

public class HttpServerCodec
extends Object
implements ChannelUpstreamHandler, ChannelDownstreamHandler

A combination of HttpRequestDecoder and HttpResponseEncoder which enables easier server side HTTP implementation.

Version:
$Rev: 2241 $, $Date: 2010-04-16 13:12:43 +0900 (Fri, 16 Apr 2010) $
Author:
The Netty Project, Trustin Lee
See Also:
HttpClientCodec

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable
 
Constructor Summary
HttpServerCodec()
          Creates a new instance with the default decoder options (maxInitialLineLength (4096}, maxHeaderSize (8192), and maxChunkSize (8192)).
HttpServerCodec(int maxInitialLineLength, int maxHeaderSize, int maxChunkSize)
          Creates a new instance with the specified decoder options.
 
Method Summary
 void handleDownstream(ChannelHandlerContext ctx, ChannelEvent e)
          Handles the specified downstream event.
 void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e)
          Handles the specified upstream event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpServerCodec

public HttpServerCodec()
Creates a new instance with the default decoder options (maxInitialLineLength (4096}, maxHeaderSize (8192), and maxChunkSize (8192)).


HttpServerCodec

public HttpServerCodec(int maxInitialLineLength,
                       int maxHeaderSize,
                       int maxChunkSize)
Creates a new instance with the specified decoder options.

Method Detail

handleUpstream

public void handleUpstream(ChannelHandlerContext ctx,
                           ChannelEvent e)
                    throws Exception
Description copied from interface: ChannelUpstreamHandler
Handles the specified upstream event.

Specified by:
handleUpstream in interface ChannelUpstreamHandler
Parameters:
ctx - the context object for this handler
e - the upstream event to process or intercept
Throws:
Exception

handleDownstream

public void handleDownstream(ChannelHandlerContext ctx,
                             ChannelEvent e)
                      throws Exception
Description copied from interface: ChannelDownstreamHandler
Handles the specified downstream event.

Specified by:
handleDownstream in interface ChannelDownstreamHandler
Parameters:
ctx - the context object for this handler
e - the downstream event to process or intercept
Throws:
Exception


Copyright © 2008-2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.