Class AbstractMessageWriter<T extends HttpMessage>

    • Constructor Detail

      • AbstractMessageWriter

        public AbstractMessageWriter​(LineFormatter formatter)
        Creates an instance of AbstractMessageWriter.
        Parameters:
        formatter - the line formatter If null BasicLineFormatter.INSTANCE will be used.
        Since:
        4.3
    • Method Detail

      • writeHeadLine

        protected abstract void writeHeadLine​(T message,
                                              CharArrayBuffer buffer)
                                       throws java.io.IOException
        Writes out the first line of HttpMessage.
        Parameters:
        message - HTTP message.
        Throws:
        java.io.IOException
      • write

        public void write​(T message,
                          SessionOutputBuffer sessionBuffer)
                   throws java.io.IOException,
                          HttpException
        Description copied from interface: NHttpMessageWriter
        Writes out the HTTP message head.
        Specified by:
        write in interface NHttpMessageWriter<T extends HttpMessage>
        Parameters:
        message - HTTP message.
        sessionBuffer - session output buffer.
        Throws:
        java.io.IOException - in case of an I/O error.
        HttpException - in case the HTTP message is malformed or violates the HTTP protocol.