Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_CONFIG
parameter for the application container configuration file
|
static String |
APPLICATION_HASSHUTDOWNHOOK
parameter for setting a shutdown hook
|
static String |
APPLICATION_HOME
parameter for the application home directory
|
static String |
APPLICATION_ISBLOCKING
parameter for blocking the main thread in Main.run()
|
static String |
APPLICATION_NAME
parameter for the application name
|
static String |
APPLICATION_TEMP
parameter for the application temporary directory
|
Constructor and Description |
---|
Main()
Constructor
|
Main(String[] args)
Constructor
The following command line parameters are supported
--yaafi.cli.applicationName name
--yaafi.cli.applicationHome dir
--yaafi.cli.tempHome dir
--yaafi.cli.isBlocking [true|false]
--yaafi.cli.hasShutdownHook [true|false]
--yaafi.cli.config file
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Dispose the YAAFI container
|
String |
getApplicationHome() |
String |
getApplicationName() |
String[] |
getArgs() |
String |
getContainerConfigValue() |
org.apache.avalon.framework.logger.Logger |
getLogger() |
ServiceContainer |
getServiceContainer() |
org.apache.avalon.framework.service.ServiceManager |
getServiceManager() |
String |
getTempHome() |
boolean |
hasShutdownHook() |
void |
initialize()
Initialize the instance
|
boolean |
isBlocking() |
boolean |
isInitialized() |
static void |
main(String[] args)
The main method.
|
static File |
makeAbsoluteFile(File baseDir,
String name)
Determines the file location of the given name.
|
File |
makeAbsoluteFile(String fileName)
Locates the file for the given file name.
|
String |
makeAbsolutePath(String fileName)
Locates the file for the given file name.
|
void |
onWait()
Depending on the configuration this method might block
the calling thread or return immediately.
|
void |
run()
Runs the instance by initializing it and potentially blocking
the invoking thread depending on the configuration.
|
void |
setApplicationHome(String applicationHome) |
void |
setApplicationName(String applicationName) |
void |
setArgs(String[] args) |
void |
setContainerConfigValue(String containerConfigValue) |
void |
setHasShutdownHook(boolean hasShutdownHook) |
void |
setHasShutdownHook(Boolean hasShutdownHook) |
void |
setHasShutdownHook(String hasShutdownHook) |
protected void |
setInitialized(boolean isInitialized) |
void |
setIsBlocking(boolean isBlocking) |
void |
setIsBlocking(Boolean isBlocking) |
void |
setIsBlocking(String isBlocking) |
void |
setLogger(org.apache.avalon.framework.logger.Logger logger) |
void |
setTempHome(String tempHome) |
protected void |
shutdown()
Terminates the instance
|
String |
toString() |
public static final String APPLICATION_NAME
public static final String APPLICATION_HOME
public static final String APPLICATION_TEMP
public static final String APPLICATION_CONFIG
public static final String APPLICATION_HASSHUTDOWNHOOK
public static final String APPLICATION_ISBLOCKING
public Main()
public Main(String[] args)
args
- the command line argumentspublic static void main(String[] args) throws Exception
args
- Command line argumentsException
- the execution failedpublic static File makeAbsoluteFile(File baseDir, String name)
baseDir
- the base directoryname
- the filenamepublic void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
public void run()
run
in interface Runnable
Runnable.run()
public void onWait()
public File makeAbsoluteFile(String fileName)
fileName
- the filenamepublic String makeAbsolutePath(String fileName)
fileName
- the filenamepublic ServiceContainer getServiceContainer()
public org.apache.avalon.framework.service.ServiceManager getServiceManager()
public String getApplicationHome()
public void setApplicationHome(String applicationHome)
applicationHome
- The applicationHome to set.public String getContainerConfigValue()
public void setContainerConfigValue(String containerConfigValue)
containerConfigValue
- The containerConfigValue to set.public boolean isBlocking()
public void setIsBlocking(boolean isBlocking)
isBlocking
- The isBlocking to set.public void setIsBlocking(Boolean isBlocking)
isBlocking
- The isBlocking to set.public void setIsBlocking(String isBlocking)
isBlocking
- The isBlocking to set.public String getTempHome()
public void setTempHome(String tempHome)
tempHome
- The tempHome to set.public org.apache.avalon.framework.logger.Logger getLogger()
public void setLogger(org.apache.avalon.framework.logger.Logger logger)
logger
- The logger to set.public String getApplicationName()
public void setApplicationName(String applicationName)
applicationName
- The applicationName to set.public boolean hasShutdownHook()
public void setHasShutdownHook(boolean hasShutdownHook)
hasShutdownHook
- The hasShutdownHook to set.public void setHasShutdownHook(Boolean hasShutdownHook)
hasShutdownHook
- The hasShutdownHook to set.public void setHasShutdownHook(String hasShutdownHook)
hasShutdownHook
- The hasShutdownHook to set.public String toString()
toString
in class Object
Object.toString()
public boolean isInitialized()
protected void setInitialized(boolean isInitialized)
isInitialized
- The isInitialized to set.public void initialize() throws Exception
Exception
- the initialization failedprotected void shutdown()
Copyright © 2004–1970 The Apache Software Foundation. All rights reserved.