All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.khasanof.collector.context.DefaultContextOperationExecutor Maven / Gradle / Ivy

The newest version!
package org.khasanof.collector.context;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

/**
 * @author Nurislom
 * @see org.khasanof.collector.context
 * @since 1/15/2024 11:19 PM
 */
@Slf4j
@Service
public class DefaultContextOperationExecutor implements ContextOperationExecutor {

    private final ApplicationContext applicationContext;

    public DefaultContextOperationExecutor(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }

    @Override
    public  R execute(Class> operationClass, P data) {
        return applicationContext.getBean(operationClass)
                .execute(data);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy