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

        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

     *
     * @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

        }

        try {
            DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(name);
            builder.clearErrorListeners();
            builder.addErrorListener(new ConfigurationErrorListener() {
                @Override
                public void configurationError(ConfigurationErrorEvent event) {
                    if (event.getType() == DefaultConfigurationBuilder.EVENT_ERR_LOAD_OPTIONAL) {
                        LOG.debug("Could not load optional configuration file {}", event.getPropertyName(),
                            event.getCause());
View Full Code Here

        }

        try {
            DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(name);
            builder.clearErrorListeners();
            builder.addErrorListener(new ConfigurationErrorListener() {
                @Override
                public void configurationError(ConfigurationErrorEvent event) {
                    if (event.getType() == DefaultConfigurationBuilder.EVENT_ERR_LOAD_OPTIONAL) {
                        LOG.debug("Could not load optional configuration file {}", event.getPropertyName(),
                            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.