JavaScript is disabled on your browser.
Skip navigation links
io.netty.handler.codec.http

Class HttpObjectEncoder<H extends HttpMessage>

    • Constructor Detail

      • HttpObjectEncoder

        public HttpObjectEncoder()
    • Method Detail

      • encode

        protected void encode(ChannelHandlerContext ctx,
         java.lang.Object msg,
         java.util.List<java.lang.Object> out)
         throws java.lang.Exception
        Description copied from class: MessageToMessageEncoder
        Encode from one message to an other. This method will be called for each written message that can be handled by this encoder.
        Specified by:
        encode in class MessageToMessageEncoder<java.lang.Object>
        Parameters:
        ctx - the ChannelHandlerContext which this MessageToMessageEncoder belongs to
        msg - the message to encode to an other one
        out - the List into which the encoded msg should be added needs to do some kind of aggregation
        Throws:
        java.lang.Exception - is thrown if an error occurs
      • sanitizeHeadersBeforeEncode

        protected void sanitizeHeadersBeforeEncode(H msg,
         boolean isAlwaysEmpty)
        Allows to sanitize headers of the message before encoding these.
      • isContentAlwaysEmpty

        protected boolean isContentAlwaysEmpty(H msg)
        Determine whether a message has a content or not. Some message may have headers indicating a content without having an actual content, e.g the response to an HEAD or CONNECT request.
        Parameters:
        msg - the message to test
        Returns:
        true to signal the message has no content
      • encodeAscii

        @Deprecated
        protected static void encodeAscii(java.lang.String s,
         ByteBuf buf)
        Deprecated.
      • encodeInitialLine

        protected abstract void encodeInitialLine(ByteBuf buf,
         H message)
         throws java.lang.Exception
        Throws:
        java.lang.Exception
Skip navigation links

Copyright © 2008–2018 The Netty Project. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /