public class JavaVersionManager<C extends ApplicationContext> extends AsyncInitializableObject<C>
JavaVersion
objects. Note: if the env-variable is not
set, then the java.home property is used as a default for determining the base
installation path for scanning.Constructor and Description |
---|
JavaVersionManager(C ctx) |
Modifier and Type | Method and Description |
---|---|
AsyncTask |
buildScanJavaVersionTask() |
AsyncTask |
buildScanJavaVersionWFT(AbstractWorkflow workflow) |
protected AsyncTask |
createInitTask() |
TaskAction |
getActionInit() |
JavaVersion[] |
getJavaVersions()
Returns the available Java versions that have been found on the local system.
|
JavaVersion |
getLatestJavaVersion()
Returns the latest java version of all installed java versions.
|
JavaVersion |
getLatestJavaVersionOf(JavaTechnology technology)
Returns the latest java version for the given technology.
|
void |
init()
Note that initialization scans for all java versions in the system.
|
JavaVersion[] |
scanJavaVersions()
Scans the file system for available Java versions.
|
void |
setScanPathEnvironmentVariableName(java.lang.String variableName)
Sets the name for the environment variable which is supposed to store the path to be scanned.
|
void |
setVersionComparator(java.util.Comparator<JavaVersion> cmp)
Resorts the version list according to the given comparator.
|
awaitInitialized, checkInitialized, initAsyc, setInitialized
isInitialized
getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isInitialized
public JavaVersionManager(C ctx)
public final TaskAction getActionInit()
public final void setVersionComparator(java.util.Comparator<JavaVersion> cmp)
public final void setScanPathEnvironmentVariableName(java.lang.String variableName)
public final JavaVersion[] getJavaVersions()
scanJavaVersions()
for an initial scan.scanJavaVersions()
public final JavaVersion getLatestJavaVersion()
public final JavaVersion getLatestJavaVersionOf(JavaTechnology technology)
public void init() throws java.lang.Exception
init
in interface Initializable
init
in class AbstractInitializableObject<C extends ApplicationContext>
java.lang.Exception
AsyncInitializableObject.initAsyc()
public final JavaVersion[] scanJavaVersions() throws java.lang.Exception
java.lang.Exception
protected AsyncTask createInitTask()
createInitTask
in class AsyncInitializableObject<C extends ApplicationContext>
public final AsyncTask buildScanJavaVersionTask()
public final AsyncTask buildScanJavaVersionWFT(AbstractWorkflow workflow)
Copyright © 2014 EsprIT-Systems. All Rights Reserved.