Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.listener;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.aop.TargetSource;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.support.DefaultPointcutAdvisor;
import org.springframework.batch.support.MethodInvoker;
import org.springframework.batch.support.MethodInvokerUtils;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.Ordered;
import org.springframework.util.Assert;
import static org.springframework.batch.support.MethodInvokerUtils.getMethodInvokerByAnnotation;
import static org.springframework.batch.support.MethodInvokerUtils.getMethodInvokerForInterface;
/**
* {@link FactoryBean} implementation that builds a listener based on the various
* lifecycle methods or annotations that are provided. There are three possible ways of
* having a method called as part of a listener lifecycle:
*
*
*
Interface implementation: By implementing any of the subclasses of a listener
* interface, methods on said interface will be called
*
Annotations: Annotating a method will result in registration.
*
String name of the method to be called, which is tied to a {@link ListenerMetaData}
* value in the metaDataMap.
*
*
* It should be noted that methods obtained by name or annotation that don't match the
* listener method signatures to which they belong will cause errors. However, it is
* acceptable to have no parameters at all. If the same method is marked in more than one
* way. (i.e. the method name is given and it is annotated) the method will only be called
* once. However, if the same class has multiple methods tied to a particular listener,
* each method will be called. Also note that the same annotations cannot be applied to
* two separate methods in a single class.
*
* @author Lucas Ward
* @author Dan Garrette
* @since 2.0
* @see ListenerMetaData
*/
public abstract class AbstractListenerFactoryBean implements FactoryBean