Class XMLLoggingOutInterceptor

  • All Implemented Interfaces:
    adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, org.apache.cxf.interceptor.Interceptor<org.apache.cxf.message.Message>, org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.Message>

    public class XMLLoggingOutInterceptor
    extends AbstractOutInterceptor
    Default XML Logging interceptor.
    greenbird Integration Technology, FracPete (fracpete at waikato dot ac dot nz) - simplified
    • Field Detail

      • logger

        protected adams.core.logging.Logger logger
      • prettyPrint

        protected boolean prettyPrint
        whether to use pretty printing.
      • outputFile

        protected File outputFile
        the file to output the XML messages to - disabled if null.
      • convert

        protected convert
        the conversion for pretty printing the XML.
      • formatter

        protected transient adams.core.DateFormat formatter
        for outputting timestamps in the output file.
    • Constructor Detail

      • XMLLoggingOutInterceptor

        public XMLLoggingOutInterceptor()
      • XMLLoggingOutInterceptor

        public XMLLoggingOutInterceptor​(adams.core.logging.Logger logger,
                                        boolean prettyPrint,
                                        File outputFile)
    • Method Detail

      • prettyPrint

        protected StringBuilder prettyPrint​(StringBuilder buffer)
        Pretty prints the buffer, if enabled.
        buffer - the buffer to turn into "pretty" XML
        the (potentially) new buffer
      • handleMessage

        public void handleMessage​(org.apache.cxf.message.Message message)
                           throws org.apache.cxf.interceptor.Fault
      • logProperties

        protected void logProperties​(StringBuilder buffer,
                                     org.apache.cxf.message.Message message)
        Method intended for use within subclasses. Log custom field here.
        message - message
      • getIdHeader

        protected String getIdHeader​(org.apache.cxf.message.Message message)
        Gets theMessageID header in the list of headers.
      • getHeader

        protected String getHeader​(org.apache.cxf.message.Message message,
                                   String name)