Class AbstractOutInterceptor

  • 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>
    Direct Known Subclasses:
    BaseLogging, Enqueue, LogFile, LogURL

    public abstract class AbstractOutInterceptor
    extends org.apache.cxf.phase.AbstractPhaseInterceptor<org.apache.cxf.message.Message>
    implements adams.core.logging.LoggingSupporter, adams.core.logging.LoggingLevelHandler
    Interceptor for outgoing messages.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected adams.core.logging.Logger m_Logger
      the logger in use.
      protected adams.core.logging.LoggingLevel m_LoggingLevel
      the logging level.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractOutInterceptor​(String phase)
      Initializes the interceptor.
    • Field Detail

      • m_LoggingLevel

        protected adams.core.logging.LoggingLevel m_LoggingLevel
        the logging level.
      • m_Logger

        protected transient adams.core.logging.Logger m_Logger
        the logger in use.
    • Constructor Detail

      • AbstractOutInterceptor

        protected AbstractOutInterceptor​(String phase)
        Initializes the interceptor.
        Parameters:
        phase - the phase to use
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.

        Default implementation does nothing.
      • initializeLogging

        protected void initializeLogging()
        Pre-configures the logging.
      • configureLogger

        protected void configureLogger()
        Initializes the logger.

        Default implementation uses the class name.
      • getLogger

        public adams.core.logging.Logger getLogger()
        Returns the logger in use.
        Specified by:
        getLogger in interface adams.core.logging.LoggingSupporter
        Returns:
        the logger
      • setLoggingLevel

        public void setLoggingLevel​(adams.core.logging.LoggingLevel value)
        Sets the logging level.
        Specified by:
        setLoggingLevel in interface adams.core.logging.LoggingLevelHandler
        Parameters:
        value - the level
      • getLoggingLevel

        public adams.core.logging.LoggingLevel getLoggingLevel()
        Returns the logging level.
        Specified by:
        getLoggingLevel in interface adams.core.logging.LoggingLevelHandler
        Returns:
        the level
      • isLoggingEnabled

        public boolean isLoggingEnabled()
        Returns whether logging is enabled.
        Specified by:
        isLoggingEnabled in interface adams.core.logging.LoggingSupporter
        Returns:
        true if at least Level.CONFIG
      • isInfoLoggingEnabled

        public boolean isInfoLoggingEnabled()
        Returns whether info logging is enabled.
        Returns:
        true if at least Level.INFO