org.khasanof.collector.context.operation.FindHandlerMethodOperation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-boot-starter-fluent Show documentation
Show all versions of spring-boot-starter-fluent Show documentation
Fluent - Easy Telegram Bots with Spring
The newest version!
package org.khasanof.collector.context.operation;
import org.khasanof.collector.context.ContextOperation;
import org.khasanof.models.collector.FindHandlerMethod;
import org.khasanof.models.invoker.SimpleInvoker;
import org.khasanof.service.search.SearchHandlerMethodService;
import org.springframework.stereotype.Component;
import java.util.Optional;
/**
* @author Nurislom
* @see org.khasanof.collector.context
* @since 1/15/2024 10:32 PM
*/
@Component
public class FindHandlerMethodOperation implements ContextOperation> {
private final SearchHandlerMethodService searchHandlerMethodService;
public FindHandlerMethodOperation(SearchHandlerMethodService searchHandlerMethodService) {
this.searchHandlerMethodService = searchHandlerMethodService;
}
@Override
public Optional execute(FindHandlerMethod method) {
return searchHandlerMethodService.find(method);
}
}