Class InterceptorHelper


  • public class InterceptorHelper
    extends Object
    Helper class for interceptor related stuff.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • OUTGOING_LOG_SETUP

        public static final String OUTGOING_LOG_SETUP
    • Constructor Detail

      • InterceptorHelper

        public InterceptorHelper()
    • Method Detail

      • setupOutgoingBuffer

        public static org.apache.cxf.interceptor.LoggingMessage setupOutgoingBuffer​(org.apache.cxf.message.Message message)
        Configures the buffer for the outgoing message.
        Parameters:
        message - the message to configure the buffer for
        Returns:
        the configured buffer
      • writeOutgoingPayload

        public static void writeOutgoingPayload​(StringBuilder builder,
                                                org.apache.cxf.message.Message message,
                                                org.apache.cxf.io.CachedOutputStream cos,
                                                String encoding,
                                                String contentType)
                                         throws Exception
        Writes the outgoing payload to a buffer.
        Parameters:
        builder - the buffer to write to
        message - the message
        cos - the cached output stream
        encoding - the encoding to use
        contentType - the content type
        Throws:
        Exception
      • writeIncomingPayload

        public static void writeIncomingPayload​(StringBuilder builder,
                                                org.apache.cxf.io.CachedOutputStream cos,
                                                String encoding,
                                                String contentType)
                                         throws Exception
        Writes the payload of a message to the buffer.
        Parameters:
        builder - the buffer to write to
        cos - the cached output stream to use
        encoding - the encoding to use
        contentType - the content type
        Throws:
        Exception
      • writeIncomingMessage

        public static org.apache.cxf.interceptor.LoggingMessage writeIncomingMessage​(org.apache.cxf.message.Message message)
        Writes the message to a buffer.
        Parameters:
        message - the message to write to a buffer
        Returns:
        the generated buffer
      • setupIncomingBuffer

        public static org.apache.cxf.interceptor.LoggingMessage setupIncomingBuffer​(org.apache.cxf.message.Message message)
        Configures the buffer for the incoming message.
        Parameters:
        message - the message to configure the buffer for
        Returns:
        the generated buffer