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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setConfiguredName
(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:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getTaskName
- Specified by:
getTaskName
in interfaceTaskNameResolver
- Returns:
- the name of the task being executed within this context.
-