Spring for Apache Hadoop

org.springframework.yarn.boot
Class SpringApplicationTemplate

java.lang.Object
  extended by org.springframework.yarn.boot.SpringApplicationTemplate

public class SpringApplicationTemplate
extends java.lang.Object

SpringApplicationTemplate is meant to safely run SpringApplication from a SpringApplicationBuilder with a callback action SpringApplicationCallback to do operations against an ApplicationContext and then optionally return an value back to a caller.

Author:
Janne Valkealahti

Constructor Summary
SpringApplicationTemplate(org.springframework.boot.builder.SpringApplicationBuilder builder)
          Instantiates a new spring application template.
 
Method Summary
<T> T
execute(SpringApplicationCallback<T> action, java.lang.String... args)
          Execute spring application from a builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringApplicationTemplate

public SpringApplicationTemplate(org.springframework.boot.builder.SpringApplicationBuilder builder)
Instantiates a new spring application template.

Parameters:
builder - the spring application builder
Method Detail

execute

public <T> T execute(SpringApplicationCallback<T> action,
                     java.lang.String... args)
          throws SpringApplicationException
Execute spring application from a builder. This method will automatically close a context associated with a spring application.

Parameters:
action - the action callback
args - the boot application args
Returns:
the value from an execution
Throws:
SpringApplicationException

Spring for Apache Hadoop