001    /**
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.camel.management;
018    
019    import org.apache.camel.impl.ServiceSupport;
020    import org.apache.camel.spi.EventNotifier;
021    import org.apache.commons.logging.Log;
022    import org.apache.commons.logging.LogFactory;
023    
024    /**
025     * Base class to extend for custom {@link EventNotifier} implementations.
026     *
027     * @version $Revision: 20312 $
028     */
029    public abstract class EventNotifierSupport extends ServiceSupport implements EventNotifier {
030        protected Log log = LogFactory.getLog(getClass());
031        private boolean ignoreCamelContextEvents;
032        private boolean ignoreRouteEvents;
033        private boolean ignoreServiceEvents;
034        private boolean ignoreExchangeEvents;
035        private boolean ignoreExchangeCreatedEvent;
036        private boolean ignoreExchangeCompletedEvent;
037        private boolean ignoreExchangeFailedEvents;
038        private boolean ignoreExchangeRedeliveryEvents;
039        private boolean ignoreExchangeSentEvents;
040    
041        public boolean isIgnoreCamelContextEvents() {
042            return ignoreCamelContextEvents;
043        }
044    
045        public void setIgnoreCamelContextEvents(boolean ignoreCamelContextEvents) {
046            this.ignoreCamelContextEvents = ignoreCamelContextEvents;
047        }
048    
049        public boolean isIgnoreRouteEvents() {
050            return ignoreRouteEvents;
051        }
052    
053        public void setIgnoreRouteEvents(boolean ignoreRouteEvents) {
054            this.ignoreRouteEvents = ignoreRouteEvents;
055        }
056    
057        public boolean isIgnoreServiceEvents() {
058            return ignoreServiceEvents;
059        }
060    
061        public void setIgnoreServiceEvents(boolean ignoreServiceEvents) {
062            this.ignoreServiceEvents = ignoreServiceEvents;
063        }
064    
065        public boolean isIgnoreExchangeEvents() {
066            return ignoreExchangeEvents;
067        }
068    
069        public void setIgnoreExchangeEvents(boolean ignoreExchangeEvents) {
070            this.ignoreExchangeEvents = ignoreExchangeEvents;
071        }
072    
073        public boolean isIgnoreExchangeCreatedEvent() {
074            return ignoreExchangeCreatedEvent;
075        }
076    
077        public void setIgnoreExchangeCreatedEvent(boolean ignoreExchangeCreatedEvent) {
078            this.ignoreExchangeCreatedEvent = ignoreExchangeCreatedEvent;
079        }
080    
081        public boolean isIgnoreExchangeCompletedEvent() {
082            return ignoreExchangeCompletedEvent;
083        }
084    
085        public void setIgnoreExchangeCompletedEvent(boolean ignoreExchangeCompletedEvent) {
086            this.ignoreExchangeCompletedEvent = ignoreExchangeCompletedEvent;
087        }
088    
089        public boolean isIgnoreExchangeFailedEvents() {
090            return ignoreExchangeFailedEvents;
091        }
092    
093        public void setIgnoreExchangeFailedEvents(boolean ignoreExchangeFailedEvents) {
094            this.ignoreExchangeFailedEvents = ignoreExchangeFailedEvents;
095        }
096    
097        public boolean isIgnoreExchangeRedeliveryEvents() {
098            return ignoreExchangeRedeliveryEvents;
099        }
100    
101        public void setIgnoreExchangeRedeliveryEvents(boolean ignoreExchangeRedeliveryEvents) {
102            this.ignoreExchangeRedeliveryEvents = ignoreExchangeRedeliveryEvents;
103        }
104    
105        public boolean isIgnoreExchangeSentEvents() {
106            return ignoreExchangeSentEvents;
107        }
108    
109        public void setIgnoreExchangeSentEvents(boolean ignoreExchangeSentEvents) {
110            this.ignoreExchangeSentEvents = ignoreExchangeSentEvents;
111        }
112    }