Class RequestLoggerInputStream

    • Constructor Detail

      • RequestLoggerInputStream

        public RequestLoggerInputStream​(InputStream requestEntityStream,
                                        int logCollectLimit,
                                        String requestPrefix,
                                        StringBuilder logMessage)
        Constructor
        Parameters:
        requestEntityStream - original requestEntityStream
        logCollectLimit - read limit
        requestPrefix - request log prefix
        logMessage - log message
    • Method Detail

      • read

        public int read()
                 throws IOException

        Extra functionality: On read the request entity data is appended from the original InputStream to an internal StringBuilder until a given limit is reached (or until the end of stream if log limit exceeds the length of the stream). Then publishes an event to log the given request message with the appended request entity.
        Specified by:
        read in class InputStream
        Throws:
        IOException