Class LoggingWriterInterceptor

  • All Implemented Interfaces:
    jakarta.ws.rs.ext.WriterInterceptor

    public class LoggingWriterInterceptor
    extends Object
    implements jakarta.ws.rs.ext.WriterInterceptor
    Use to log the outbound stream.
    Author:
    Adrian Herscu
    • Constructor Detail

      • LoggingWriterInterceptor

        public LoggingWriterInterceptor​(Consumer<String> logger)
        Parameters:
        logger - the logging function to use
    • Method Detail

      • aroundWriteTo

        public void aroundWriteTo​(jakarta.ws.rs.ext.WriterInterceptorContext context)
                           throws IOException
        Specified by:
        aroundWriteTo in interface jakarta.ws.rs.ext.WriterInterceptor
        Throws:
        IOException