org.jboss.netty.handler.codec.http2
Class HttpMessageEncoder

java.lang.Object
  extended by org.jboss.netty.handler.codec.oneone.OneToOneEncoder
      extended by org.jboss.netty.handler.codec.http2.HttpMessageEncoder
All Implemented Interfaces:
org.jboss.netty.channel.ChannelDownstreamHandler, org.jboss.netty.channel.ChannelHandler
Direct Known Subclasses:
HttpRequestEncoder, HttpResponseEncoder

public abstract class HttpMessageEncoder
extends org.jboss.netty.handler.codec.oneone.OneToOneEncoder

Encodes an HttpMessage or an HttpChunk into a ChannelBuffer.

Extensibility

Please note that this encoder is designed to be extended to implement a protocol derived from HTTP, such as RTSP and ICAP. To implement the encoder of such a derived protocol, extend this class and implement all abstract methods properly.

Version:
$Rev: 1107 $, $Date: 2012-04-15 19:00:57 +0200 (dim., 15 avr. 2012) $
Author:
The Netty Project, Andy Taylor (andy.taylor@jboss.org), Trustin Lee

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
protected HttpMessageEncoder()
          Creates a new instance.
 
Method Summary
protected  Object encode(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.Channel channel, Object msg)
           
protected abstract  void encodeInitialLine(org.jboss.netty.buffer.ChannelBuffer buf, HttpMessage message)
           
 
Methods inherited from class org.jboss.netty.handler.codec.oneone.OneToOneEncoder
handleDownstream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpMessageEncoder

protected HttpMessageEncoder()
Creates a new instance.

Method Detail

encode

protected Object encode(org.jboss.netty.channel.ChannelHandlerContext ctx,
                        org.jboss.netty.channel.Channel channel,
                        Object msg)
                 throws Exception
Specified by:
encode in class org.jboss.netty.handler.codec.oneone.OneToOneEncoder
Throws:
Exception

encodeInitialLine

protected abstract void encodeInitialLine(org.jboss.netty.buffer.ChannelBuffer buf,
                                          HttpMessage message)
                                   throws Exception
Throws:
Exception


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.