001 /*
002 * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.osgi.service.cm;
017
018 /**
019 * Listener for Configuration Events. When a <code>ConfigurationEvent</code>
020 * is fired, it is asynchronously delivered to a
021 * <code>ConfigurationListener</code>.
022 *
023 * <p>
024 * <code>ConfigurationListener</code> objects are registered with the
025 * Framework service registry and are notified with a
026 * <code>ConfigurationEvent</code> object when an event is fired.
027 * <p>
028 * <code>ConfigurationListener</code> objects can inspect the received
029 * <code>ConfigurationEvent</code> object to determine its type, the pid of
030 * the <code>Configuration</code> object with which it is associated, and the
031 * Configuration Admin service that fired the event.
032 *
033 * <p>
034 * Security Considerations. Bundles wishing to monitor configuration events will
035 * require <code>ServicePermission[ConfigurationListener,REGISTER]</code> to
036 * register a <code>ConfigurationListener</code> service.
037 *
038 * @version $Revision: 5673 $
039 * @since 1.2
040 */
041 public interface ConfigurationListener {
042 /**
043 * Receives notification of a Configuration that has changed.
044 *
045 * @param event The <code>ConfigurationEvent</code>.
046 */
047 public void configurationEvent(ConfigurationEvent event);
048 }