001/* 002 * Copyright 2002-2007 the original author or authors. 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 * https://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 017package org.springframework.beans.factory.parsing; 018 019import java.util.EventListener; 020 021/** 022 * Interface that receives callbacks for component, alias and import 023 * registrations during a bean definition reading process. 024 * 025 * @author Rob Harrop 026 * @author Juergen Hoeller 027 * @since 2.0 028 * @see ReaderContext 029 */ 030public interface ReaderEventListener extends EventListener { 031 032 /** 033 * Notification that the given defaults has been registered. 034 * @param defaultsDefinition a descriptor for the defaults 035 * @see org.springframework.beans.factory.xml.DocumentDefaultsDefinition 036 */ 037 void defaultsRegistered(DefaultsDefinition defaultsDefinition); 038 039 /** 040 * Notification that the given component has been registered. 041 * @param componentDefinition a descriptor for the new component 042 * @see BeanComponentDefinition 043 */ 044 void componentRegistered(ComponentDefinition componentDefinition); 045 046 /** 047 * Notification that the given alias has been registered. 048 * @param aliasDefinition a descriptor for the new alias 049 */ 050 void aliasRegistered(AliasDefinition aliasDefinition); 051 052 /** 053 * Notification that the given import has been processed. 054 * @param importDefinition a descriptor for the import 055 */ 056 void importProcessed(ImportDefinition importDefinition); 057 058}