public class CommonLauncher
extends java.lang.Object
Title: Launcher.java
Description:
bboss workgroup
Copyright (c) 2008
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
mainclass |
| Constructor and Description |
|---|
CommonLauncher() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Boolean |
getBooleanAttribute(java.lang.String name) |
static java.lang.Boolean |
getBooleanAttribute(java.lang.String name,
java.lang.Boolean defaultValue) |
static java.lang.String |
getHostname()
Determine the hostname of the machine Kettle is running on
|
static java.lang.Integer |
getIntProperty(java.lang.String propertyName)
先从配置文件获取属性,如果配置文件中没有,则从系统jvm变量中取,如果系统变量中没有,则采用默认值
|
static java.lang.Integer |
getIntProperty(java.lang.String propertyName,
java.lang.Integer defaultValue)
先从配置文件获取属性,如果配置文件中没有,则从系统jvm变量中取,如果系统变量中没有,则采用默认值
|
static java.lang.Integer |
getIntProperty(java.lang.String propertyName,
java.lang.String defaultValue)
先从配置文件获取属性,如果配置文件中没有,则从系统jvm变量中取,如果系统变量中没有,则采用默认值
|
static java.lang.String |
getIPAddress()
Determins the IP address of the machine Kettle is running on.
|
static java.lang.String |
getIPAddress(java.lang.String networkInterfaceName)
Get the primary IP address tied to a network interface (excluding
loop-back etc)
|
static java.lang.Long |
getLongAttribute(java.lang.String name) |
static java.lang.Long |
getLongAttribute(java.lang.String name,
java.lang.Long defaultValue) |
static java.lang.String |
getMACAddress()
Tries to determine the MAC address of the machine Kettle is running on.
|
static java.lang.String |
getOS()
determine the OS name
|
static java.lang.String |
getProcessID() |
static java.lang.String |
getProperty(java.lang.String pro) |
static java.lang.String |
getProperty(java.lang.String pro,
boolean trim) |
static java.lang.String |
getProperty(java.lang.String pro,
java.lang.String defaultValue) |
static java.lang.String |
getProperty(java.lang.String propertyName,
java.lang.String defaultValue,
boolean trim)
先从配置文件获取属性,如果配置文件中没有,则从系统jvm变量中取,如果系统变量中没有,则采用默认值
|
static java.lang.Short |
getShortAttribute(java.lang.String name) |
static java.lang.Short |
getShortAttribute(java.lang.String name,
java.lang.Short defaultValue) |
static boolean |
isEmpty(java.lang.String string) |
static boolean |
isLinux() |
static boolean |
isOSX() |
static boolean |
isSpace(char c)
Determines whether or not a character is considered a space.
|
static boolean |
isWindows() |
static void |
loadPlugins(java.io.File lib,
java.io.File resourcesFile,
java.io.File classesFile,
java.io.File webclassesFile,
java.io.File weblibFile) |
static java.lang.String |
ltrim(java.lang.String source)
Left trim: remove spaces to the left of a String.
|
static void |
main(java.lang.String[] args) |
static java.lang.String |
rightPad(java.lang.StringBuilder ret,
int limit)
Right pad a StringBuffer: adds spaces to a string until a certain length.
|
static java.lang.String |
rightPad(java.lang.String ret,
int limit)
Right pad a string: adds spaces to a string until a certain length.
|
static java.lang.String |
rtrim(java.lang.String source)
Right trim: remove spaces to the right of a string
|
static void |
run(java.lang.String[] args) |
static java.lang.String |
trim(java.lang.String str)
Trims a string: removes the leading and trailing spaces of a String.
|
public static java.lang.String getProperty(java.lang.String pro)
public static java.lang.String getProperty(java.lang.String pro,
java.lang.String defaultValue)
public static java.lang.String getProperty(java.lang.String pro,
boolean trim)
public static java.lang.Integer getIntProperty(java.lang.String propertyName,
java.lang.String defaultValue)
propertyName - defaultValue - public static java.lang.Integer getIntProperty(java.lang.String propertyName)
propertyName - public static java.lang.Integer getIntProperty(java.lang.String propertyName,
java.lang.Integer defaultValue)
propertyName - defaultValue - public static java.lang.Boolean getBooleanAttribute(java.lang.String name)
public static java.lang.Boolean getBooleanAttribute(java.lang.String name,
java.lang.Boolean defaultValue)
public static java.lang.Long getLongAttribute(java.lang.String name)
public static java.lang.Long getLongAttribute(java.lang.String name,
java.lang.Long defaultValue)
public static java.lang.Short getShortAttribute(java.lang.String name)
public static java.lang.Short getShortAttribute(java.lang.String name,
java.lang.Short defaultValue)
public static java.lang.String getProperty(java.lang.String propertyName,
java.lang.String defaultValue,
boolean trim)
propertyName - defaultValue - public static void run(java.lang.String[] args)
throws java.lang.SecurityException,
java.lang.IllegalArgumentException,
java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.InstantiationException,
java.io.IOException
java.lang.SecurityExceptionjava.lang.IllegalArgumentExceptionjava.lang.ClassNotFoundExceptionjava.lang.NoSuchMethodExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.InstantiationExceptionjava.io.IOExceptionpublic static void loadPlugins(java.io.File lib,
java.io.File resourcesFile,
java.io.File classesFile,
java.io.File webclassesFile,
java.io.File weblibFile)
throws java.net.MalformedURLException,
java.lang.ClassNotFoundException,
java.lang.SecurityException,
java.lang.NoSuchMethodException,
java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.InstantiationException
lib - resourcesFile - classesFile - webclassesFile - weblibFile - java.net.MalformedURLExceptionjava.lang.ClassNotFoundExceptionjava.lang.SecurityExceptionjava.lang.NoSuchMethodExceptionjava.lang.IllegalArgumentExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.InstantiationExceptionpublic static void main(java.lang.String[] args)
throws java.lang.SecurityException,
java.lang.IllegalArgumentException,
java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.InstantiationException,
java.io.IOException
java.lang.SecurityExceptionjava.lang.IllegalArgumentExceptionjava.lang.ClassNotFoundExceptionjava.lang.NoSuchMethodExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.InstantiationExceptionjava.io.IOExceptionpublic static final java.lang.String getOS()
public static final boolean isWindows()
public static final boolean isLinux()
public static final boolean isOSX()
public static final java.lang.String getHostname()
public static final java.lang.String getIPAddress()
throws java.lang.Exception
java.lang.Exceptionpublic static final java.lang.String getIPAddress(java.lang.String networkInterfaceName)
throws java.net.SocketException
networkInterfaceName - the name of the network interface to interrogatejava.net.SocketException - in case of a security or network errorpublic static final java.lang.String getMACAddress()
throws java.lang.Exception
java.lang.Exceptionpublic static final boolean isSpace(char c)
c - The character to verify if it is a space.public static java.lang.String ltrim(java.lang.String source)
source - The String to left trimpublic static java.lang.String rtrim(java.lang.String source)
source - The string to right trimpublic static final java.lang.String trim(java.lang.String str)
str - The string to trimpublic static final java.lang.String rightPad(java.lang.String ret,
int limit)
ret - The string to padlimit - The desired length of the padded string.public static final java.lang.String rightPad(java.lang.StringBuilder ret,
int limit)
ret - The StringBuilder to padlimit - The desired length of the padded string.public static boolean isEmpty(java.lang.String string)
public static final java.lang.String getProcessID()