Class SimpleTaskNameResolver
java.lang.Object
org.springframework.cloud.task.repository.support.SimpleTaskNameResolver
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,TaskNameResolver,org.springframework.context.ApplicationContextAware
public class SimpleTaskNameResolver
extends Object
implements TaskNameResolver, org.springframework.context.ApplicationContextAware
Simple implementation of the
TaskNameResolver interface. Names the task based
on the following order of precidence:
- A configured property
spring.cloud.task.name - The
ApplicationContext's id.
- Author:
- Michael Minella
- See Also:
-
ContextIdApplicationContextInitializer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetConfiguredName(String configuredName)
-
Constructor Details
-
SimpleTaskNameResolver
public SimpleTaskNameResolver()
-
-
Method Details
-
setConfiguredName
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getTaskName
- Specified by:
getTaskNamein interfaceTaskNameResolver- Returns:
- the name of the task being executed within this context.
-