Class AbstractLogger<P extends LogPublisher<C>,​C extends LogPublisherCfg>

    • Method Detail

      • getLogPublishers

        protected abstract Collection<P> getLogPublishers()
        Returns the log publishers.
        Returns:
        the collection of LogPublishers
      • addLogPublisher

        public abstract void addLogPublisher​(P publisher)
        Add a log publisher to the logger.
        Parameters:
        publisher - The log publisher to add.
      • removeLogPublisher

        public abstract void removeLogPublisher​(P publisher)
        Remove a log publisher from the logger.
        Parameters:
        publisher - The log publisher to remove.
      • removeAllLogPublishers

        public abstract void removeAllLogPublishers()
        Removes all existing log publishers from the logger.
      • initializeLogger

        public void initializeLogger​(List<C> configs,
                                     ServerContext serverContext)
                              throws ConfigException
        Initializes all the log publishers.
        Parameters:
        configs - The log publisher configurations.
        serverContext - The server context.
        Throws:
        ConfigException - If an unrecoverable problem arises in the process of performing the initialization as a result of the server configuration.
      • isConfigurationAddAcceptable

        public boolean isConfigurationAddAcceptable​(C config,
                                                    List<LocalizableMessage> unacceptableReasons)
        Description copied from interface: ConfigurationAddListener
        Indicates whether the proposed addition of a new configuration is acceptable to this add listener.
        Specified by:
        isConfigurationAddAcceptable in interface ConfigurationAddListener<P extends LogPublisher<C>>
        Parameters:
        config - The configuration that will be added.
        unacceptableReasons - A list that can be used to hold messages about why the provided configuration is not acceptable.
        Returns:
        Returns true if the proposed addition is acceptable, or false if it is not.
      • isConfigurationChangeAcceptable

        public boolean isConfigurationChangeAcceptable​(C config,
                                                       List<LocalizableMessage> unacceptableReasons)
        Description copied from interface: ConfigurationChangeListener
        Indicates whether the proposed change to the configuration is acceptable to this change listener.
        Specified by:
        isConfigurationChangeAcceptable in interface ConfigurationChangeListener<P extends LogPublisher<C>>
        Parameters:
        config - The new configuration containing the changes.
        unacceptableReasons - A list that can be used to hold messages about why the provided configuration is not acceptable.
        Returns:
        Returns true if the proposed change is acceptable, or false if it is not.
      • isConfigurationDeleteAcceptable

        public boolean isConfigurationDeleteAcceptable​(C config,
                                                       List<LocalizableMessage> unacceptableReasons)
        Description copied from interface: ConfigurationDeleteListener
        Indicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.
        Specified by:
        isConfigurationDeleteAcceptable in interface ConfigurationDeleteListener<P extends LogPublisher<C>>
        Parameters:
        config - The configuration that will be deleted.
        unacceptableReasons - A list that can be used to hold messages about why the provided configuration is not acceptable.
        Returns:
        Returns true if the proposed deletion is acceptable, or false if it is not.