Class LogContextConfigurationImpl

    • Field Detail

      • loggerRefs

        private final java.util.Map<java.lang.String,​Logger> loggerRefs
      • handlerRefs

        private final java.util.Map<java.lang.String,​java.util.logging.Handler> handlerRefs
      • filterRefs

        private final java.util.Map<java.lang.String,​java.util.logging.Filter> filterRefs
      • formatterRefs

        private final java.util.Map<java.lang.String,​java.util.logging.Formatter> formatterRefs
      • errorManagerRefs

        private final java.util.Map<java.lang.String,​java.util.logging.ErrorManager> errorManagerRefs
      • pojoRefs

        private final java.util.Map<java.lang.String,​java.lang.Object> pojoRefs
      • transactionState

        private final java.util.Deque<ConfigAction<?>> transactionState
      • postConfigurationTransactionState

        private final java.util.Map<java.lang.String,​java.util.Deque<ConfigAction<?>>> postConfigurationTransactionState
      • preparedTransactions

        private final java.util.Deque<ConfigAction<?>> preparedTransactions
      • prepared

        private boolean prepared
      • ACCEPT_PRODUCER

        private static final ObjectProducer ACCEPT_PRODUCER
    • Constructor Detail

      • LogContextConfigurationImpl

        LogContextConfigurationImpl​(LogContext logContext)
    • Method Detail

      • addHandlerConfiguration

        public HandlerConfiguration addHandlerConfiguration​(java.lang.String moduleName,
                                                            java.lang.String className,
                                                            java.lang.String handlerName,
                                                            java.lang.String... constructorProperties)
        Description copied from interface: LogContextConfiguration
        Add a handler configuration.
        Specified by:
        addHandlerConfiguration in interface LogContextConfiguration
        Parameters:
        moduleName - the module name, or null to use the logmanager's class path
        className - the class name of the handler (must not be null)
        handlerName - the name of the handler (must be unique within this configuration and not null)
        constructorProperties - an optional list of constructor property names
        Returns:
        the new handler configuration
      • removeHandlerConfiguration

        public boolean removeHandlerConfiguration​(java.lang.String handlerName)
        Description copied from interface: LogContextConfiguration
        Remove a handler configuration. Also removes handler from everything it was added to.
        Specified by:
        removeHandlerConfiguration in interface LogContextConfiguration
        Parameters:
        handlerName - the handler name to remove
        Returns:
        true if the handler was removed, false if the handler didn't exist
      • addPojoConfiguration

        public PojoConfiguration addPojoConfiguration​(java.lang.String moduleName,
                                                      java.lang.String className,
                                                      java.lang.String pojoName,
                                                      java.lang.String... constructorProperties)
        Description copied from interface: LogContextConfiguration
        Add a POJO configuration.
        Specified by:
        addPojoConfiguration in interface LogContextConfiguration
        Parameters:
        moduleName - the module name, or null to use the logmanager's class path
        className - the class name of the POJO (must not be null)
        pojoName - the name of the POJO (must be unique within this configuration and not null
        constructorProperties - an optional list of constructor property names
        Returns:
        the new handler configuration
      • removePojoConfiguration

        public boolean removePojoConfiguration​(java.lang.String pojoName)
        Description copied from interface: LogContextConfiguration
        Removes the POJO configuration.
        Specified by:
        removePojoConfiguration in interface LogContextConfiguration
        Parameters:
        pojoName - the name of the POJO
        Returns:
        true if the configuration was removed, othwerwise false if the configuration did not exist or was not remove.
      • doApplyPreCreate

        private static <T> void doApplyPreCreate​(ConfigAction<T> action,
                                                 java.lang.Object arg)
      • doApplyPostCreate

        private static <T> void doApplyPostCreate​(ConfigAction<T> action,
                                                  java.lang.Object arg)
      • clear

        private void clear()
      • doPrepare

        private void doPrepare​(java.util.Deque<ConfigAction<?>> transactionState)
      • doForget

        private void doForget​(java.util.Deque<ConfigAction<?>> transactionState)
      • addPostConfigurationActions

        void addPostConfigurationActions​(java.lang.String name,
                                         java.util.Deque<ConfigAction<?>> actions)
        Adds or replaces the post configuration actions for the configuration identified by the name parameter.
        Parameters:
        name - the name of the configuration
        actions - the actions to be invoked after the properties have been set
      • removePostConfigurationActions

        java.util.Deque<?> removePostConfigurationActions​(java.lang.String name)
        Removes the post configuration actions for the configuration identified by the name parameter.
        Parameters:
        name - the name of the configuration
      • postConfigurationActionsExist

        boolean postConfigurationActionsExist​(java.lang.String name)
        Checks to see if configuration actions have already been defined for the configuration.
        Parameters:
        name - the name of the configuration
        Returns:
        true if the configuration actions have been defined, otherwise false
      • getValue

        ObjectProducer getValue​(java.lang.Class<?> objClass,
                                java.lang.String propertyName,
                                java.lang.Class<?> paramType,
                                ValueExpression<java.lang.String> valueExpression,
                                boolean immediate)
      • getFilterRefs

        java.util.Map<java.lang.String,​java.util.logging.Filter> getFilterRefs()
      • getErrorManagerRefs

        java.util.Map<java.lang.String,​java.util.logging.ErrorManager> getErrorManagerRefs()
      • getHandlerRefs

        java.util.Map<java.lang.String,​java.util.logging.Handler> getHandlerRefs()
      • getFormatterRefs

        java.util.Map<java.lang.String,​java.util.logging.Formatter> getFormatterRefs()
      • getLoggerRefs

        java.util.Map<java.lang.String,​Logger> getLoggerRefs()
      • getPojoRefs

        java.util.Map<java.lang.String,​java.lang.Object> getPojoRefs()
      • getPojoConfigurations

        java.util.Map<java.lang.String,​PojoConfigurationImpl> getPojoConfigurations()
      • tokens

        private static java.util.List<java.lang.String> tokens​(java.lang.String source)
      • parseFilterExpression

        private ObjectProducer parseFilterExpression​(java.util.Iterator<java.lang.String> iterator,
                                                     boolean outermost,
                                                     boolean immediate)
      • expectName

        private static java.lang.String expectName​(java.util.Iterator<java.lang.String> iterator)
      • expectString

        private static java.lang.String expectString​(java.util.Iterator<java.lang.String> iterator)
      • expect

        private static boolean expect​(java.lang.String trueToken,
                                      java.lang.String falseToken,
                                      java.util.Iterator<java.lang.String> iterator)
      • expect

        private static void expect​(java.lang.String token,
                                   java.util.Iterator<java.lang.String> iterator)
      • endOfExpression

        private static java.lang.IllegalArgumentException endOfExpression()
      • resolveFilter

        private ObjectProducer resolveFilter​(java.lang.String expression,
                                             boolean immediate)
      • resolveFilter

        ObjectProducer resolveFilter​(java.lang.String expression)