org.springframework.yarn.integration.support
Class IntegrationContextUtils

java.lang.Object
  extended by org.springframework.yarn.integration.support.IntegrationContextUtils

public class IntegrationContextUtils
extends Object

Utility methods for accessing common integration components from the BeanFactory.

Author:
Janne Valkealahti

Field Summary
static String TASK_SCHEDULER_BEAN_NAME
           
static String YARN_INTEGRATION_CONVERSION_SERVICE_BEAN_NAME
           
 
Constructor Summary
IntegrationContextUtils()
           
 
Method Summary
static ConversionService getConversionService(BeanFactory beanFactory)
          Return the ConversionService bean whose name is "integrationConversionService" if available.
static TaskScheduler getRequiredTaskScheduler(BeanFactory beanFactory)
          Return the TaskScheduler bean whose name is "taskScheduler".
static TaskScheduler getTaskScheduler(BeanFactory beanFactory)
          Return the TaskScheduler bean whose name is "taskScheduler" if available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TASK_SCHEDULER_BEAN_NAME

public static final String TASK_SCHEDULER_BEAN_NAME
See Also:
Constant Field Values

YARN_INTEGRATION_CONVERSION_SERVICE_BEAN_NAME

public static final String YARN_INTEGRATION_CONVERSION_SERVICE_BEAN_NAME
See Also:
Constant Field Values
Constructor Detail

IntegrationContextUtils

public IntegrationContextUtils()
Method Detail

getTaskScheduler

public static TaskScheduler getTaskScheduler(BeanFactory beanFactory)
Return the TaskScheduler bean whose name is "taskScheduler" if available.

Parameters:
beanFactory - BeanFactory for lookup, must not be null.
Returns:
task scheduler

getRequiredTaskScheduler

public static TaskScheduler getRequiredTaskScheduler(BeanFactory beanFactory)
Return the TaskScheduler bean whose name is "taskScheduler".

Parameters:
beanFactory - BeanFactory for lookup, must not be null.
Returns:
task scheduler
Throws:
IllegalStateException - if no such bean is available

getConversionService

public static ConversionService getConversionService(BeanFactory beanFactory)
Return the ConversionService bean whose name is "integrationConversionService" if available.

Parameters:
beanFactory - BeanFactory for lookup, must not be null.
Returns:
conversion service