Spring for Apache Hadoop

org.springframework.yarn.boot.app
Class AbstractClientApplication<T extends AbstractClientApplication<T>>

java.lang.Object
  extended by org.springframework.yarn.boot.app.AbstractClientApplication<T>
Type Parameters:
T - the type of a sub-class
Direct Known Subclasses:
YarnInfoApplication, YarnKillApplication, YarnPushApplication, YarnSubmitApplication

public abstract class AbstractClientApplication<T extends AbstractClientApplication<T>>
extends java.lang.Object

Base class for client applications.

Author:
Janne Valkealahti

Field Summary
protected  java.lang.String applicationBaseDir
           
protected  java.lang.String applicationVersion
           
protected  java.util.Properties appProperties
           
protected  java.util.List<java.lang.String> profiles
           
protected  java.util.List<java.lang.Object> sources
           
 
Constructor Summary
AbstractClientApplication()
           
 
Method Summary
 T applicationBaseDir(java.lang.String applicationBaseDir)
          Sets an Applications base directory to be used by a builder.
 T applicationVersion(java.lang.String applicationVersion)
          Sets an application version to be used by a builder.
 T appProperties(java.util.Properties appProperties)
          Sets application properties which will be passed into a Spring Boot environment.
protected abstract  T getThis()
          Gets the instance of this defined by a sub-class.
 T profiles(java.lang.String... profiles)
          Sets an additional profiles to be used when running an SpringApplication.
 T sources(java.lang.Object... sources)
          Sets an additional sources to by used when running an SpringApplication.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applicationVersion

protected java.lang.String applicationVersion

applicationBaseDir

protected java.lang.String applicationBaseDir

sources

protected java.util.List<java.lang.Object> sources

profiles

protected java.util.List<java.lang.String> profiles

appProperties

protected java.util.Properties appProperties
Constructor Detail

AbstractClientApplication

public AbstractClientApplication()
Method Detail

applicationVersion

public T applicationVersion(java.lang.String applicationVersion)
Sets an application version to be used by a builder.

Parameters:
applicationVersion - the application version
Returns:
the T for chaining

applicationBaseDir

public T applicationBaseDir(java.lang.String applicationBaseDir)
Sets an Applications base directory to be used by a builder.

Parameters:
applicationBaseDir - the applications base directory
Returns:
the T for chaining

sources

public T sources(java.lang.Object... sources)
Sets an additional sources to by used when running an SpringApplication.

Parameters:
sources - the additional sources for Spring Application
Returns:
the T for chaining

profiles

public T profiles(java.lang.String... profiles)
Sets an additional profiles to be used when running an SpringApplication.

Parameters:
profiles - the additional profiles for Spring Application
Returns:
the T for chaining

appProperties

public T appProperties(java.util.Properties appProperties)
Sets application properties which will be passed into a Spring Boot environment. Properties are placed with a priority which is just below command line arguments put above all other properties.

Effectively this means that these properties allow to override all existing properties but still doesn't override properties based on command-line arguments. Command-line arguments in this context are the ones passed to run method in a sub-class.

Parameters:
appProperties - the app properties
Returns:
the T for chaining

getThis

protected abstract T getThis()
Gets the instance of this defined by a sub-class. Needed for methods in this abstract class to be able to return correct type for method chaining.

Returns:
the this instance

Spring for Apache Hadoop