Package org.apache.commons.configuration.event

Examples of org.apache.commons.configuration.event.ConfigurationErrorListener


   *
   * @since 1.4
   */
  public void addErrorLogListener()
  {
    addErrorListener(new ConfigurationErrorListener()
    {
      public void configurationError(ConfigurationErrorEvent event)
      {
        getLogger().warn("Internal error", event.getCause());
      }
View Full Code Here


     *
     * @since 1.4
     */
    public void addErrorLogListener()
    {
        addErrorListener(new ConfigurationErrorListener()
        {
            public void configurationError(ConfigurationErrorEvent event)
            {
                getLogger().warn("Internal error", event.getCause());
            }
View Full Code Here

        if (!(src instanceof EventSource))
        {
            throw new IllegalArgumentException(
                    "Configuration must be derived from EventSource!");
        }
        ((EventSource) src).addErrorListener(new ConfigurationErrorListener()
        {
            public void configurationError(ConfigurationErrorEvent event)
            {
                // Throw a runtime exception
                throw new ConfigurationRuntimeException(event.getCause());
View Full Code Here

                config = new CombinedConfiguration(getNodeCombiner());
                config.setExpressionEngine(this.getExpressionEngine());
                Iterator iter = config.getErrorListeners().iterator();
                while (iter.hasNext())
                {
                    ConfigurationErrorListener listener = (ConfigurationErrorListener) iter.next();
                    config.addErrorListener(listener);
                }
                iter = config.getConfigurationListeners().iterator();
                while (iter.hasNext())
                {
View Full Code Here

     *
     * @since 1.4
     */
    public void addErrorLogListener()
    {
        addErrorListener(new ConfigurationErrorListener()
        {
            public void configurationError(ConfigurationErrorEvent event)
            {
                getLogger().warn("Internal error", event.getCause());
            }
View Full Code Here

        if (!(src instanceof EventSource))
        {
            throw new IllegalArgumentException(
                    "Configuration must be derived from EventSource!");
        }
        ((EventSource) src).addErrorListener(new ConfigurationErrorListener()
        {
            public void configurationError(ConfigurationErrorEvent event)
            {
                // Throw a runtime exception
                throw new ConfigurationRuntimeException(event.getCause());
View Full Code Here

        if (event.getSource() instanceof XMLConfiguration)
        {
            Iterator iter = getErrorListeners().iterator();
            while (iter.hasNext())
            {
                ConfigurationErrorListener listener = (ConfigurationErrorListener) iter.next();
                listener.configurationError(event);
            }
        }
    }
View Full Code Here

                config.setConversionExpressionEngine(getConversionExpressionEngine());
                config.setListDelimiter(getListDelimiter());
                Iterator iter = getErrorListeners().iterator();
                while (iter.hasNext())
                {
                    ConfigurationErrorListener listener = (ConfigurationErrorListener) iter.next();
                    config.addErrorListener(listener);
                }
                iter = getConfigurationListeners().iterator();
                while (iter.hasNext())
                {
View Full Code Here

        if (event.getSource() instanceof XMLConfiguration)
        {
            Iterator iter = getErrorListeners().iterator();
            while (iter.hasNext())
            {
                ConfigurationErrorListener listener = (ConfigurationErrorListener) iter.next();
                listener.configurationError(event);
            }
        }

        if (event.getType() == AbstractFileConfiguration.EVENT_RELOAD)
        {
View Full Code Here

        if (!(src instanceof EventSource))
        {
            throw new IllegalArgumentException(
                    "Configuration must be derived from EventSource!");
        }
        ((EventSource) src).addErrorListener(new ConfigurationErrorListener()
        {
            public void configurationError(ConfigurationErrorEvent event)
            {
                // Throw a runtime exception
                throw new ConfigurationRuntimeException(event.getCause());
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.event.ConfigurationErrorListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.