@Service public class DefaultMuleDistroService extends Object implements MuleDistroService
MuleDistribution operations.| Modifier and Type | Field and Description |
|---|---|
protected static Path |
MULE_CORE_JAR_DIRECTORY_PATH |
| Constructor and Description |
|---|
DefaultMuleDistroService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkClusterModeIsActive(Path currentMuleDistroPropertiesFilePath)
Checks if current mule distro is working on cluster mode.
|
String |
detectMuleVersion(Path muleHome)
Detects Mule Runtime Distribution version.
|
MuleDistribution |
initMuleDistro(Path muleHome)
Initializes a
MuleDistribution object after validating that the given file path corresponds to a Mule Runtime
distribution. |
boolean |
isClusterModeActive(File propertiesFile,
String currentMuleDistroPropertiesFile) |
void |
looksLikeADistro(Path muleDistroLocation)
Introspects the given directory to determine if it looks like a Mule Runtime distribution.
|
protected static final Path MULE_CORE_JAR_DIRECTORY_PATH
public MuleDistribution initMuleDistro(Path muleHome) throws IOException
MuleDistribution object after validating that the given file path corresponds to a Mule Runtime
distribution.initMuleDistro in interface MuleDistroServicemuleHome - a path pointing to a Mule Runtime distribution.MuleDistribution instance.NotDirectoryException - if given muleHome path is not a directory.FileNotFoundException - if mule-core jar used for determining the Mule distro version is not found.IOExceptionpublic void looksLikeADistro(Path muleDistroLocation) throws IOException
looksLikeADistro in interface MuleDistroServicemuleDistroLocation - a path pointing to a potential Mule Runtime distribution.IOException - if given muleHome path does not look like a distro.public boolean checkClusterModeIsActive(Path currentMuleDistroPropertiesFilePath) throws IOException
checkClusterModeIsActive in interface MuleDistroServicecurrentMuleDistroPropertiesFilePath - Current mule distro path.IOException - I/O Exception.public boolean isClusterModeActive(File propertiesFile, String currentMuleDistroPropertiesFile) throws IOException
IOExceptionpublic String detectMuleVersion(Path muleHome) throws FileNotFoundException
detectMuleVersion in interface MuleDistroServicemuleHome - Mule Runtime Distribution path.FileNotFoundException - if muleHome path is not found.Copyright © 2021 MuleSoft, Inc.. All rights reserved.