| java.lang.Object net.fenyo.gnetwatch.Config
Config | public class Config (Code) | | Instances of this class maintain general parameters like configuration properties.
author: Alexandre Fenyo version: $Id: Config.java,v 1.7 2007/03/03 00:38:19 fenyo Exp $ |
Constructor Summary | |
public | Config() Constructor. |
Method Summary | |
public ResourceBundle | getBundle() Returns the i18n resource bundle associated with this configuration.
none. | public Locale | getLocale() Returns the locale associated with this configuration.
none. | public String | getPattern(String key, Object[] params) Returns an i18n message.
Parameters: key - i18n key. Parameters: params - array of arguments to scatter in the i18n locale dependant message. | public String | getPattern(String key, Object arg) Returns an i18n message.
Parameters: key - i18n key. Parameters: arg - argument for locale dependant message. | public String | getPattern(String key, Object arg1, Object arg2) Returns an i18n message.
Parameters: key - i18n key. Parameters: arg1 - argument for locale dependant message. Parameters: arg2 - argument for locale dependant message. | public String | getPattern(String key, Object arg1, Object arg2, Object arg3) Returns an i18n message.
Parameters: key - i18n key. Parameters: arg1 - argument for locale dependant message. Parameters: arg2 - argument for locale dependant message. Parameters: arg3 - argument for locale dependant message. | public String | getPattern(String key, Object arg1, Object arg2, Object arg3, Object arg4) Returns an i18n message.
Parameters: key - i18n key. Parameters: arg1 - argument for locale dependant message. Parameters: arg2 - argument for locale dependant message. Parameters: arg3 - argument for locale dependant message. Parameters: arg4 - argument for locale dependant message. | public String | getPattern(String key, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) Returns an i18n message.
Parameters: key - i18n key. Parameters: arg1 - argument for locale dependant message. Parameters: arg2 - argument for locale dependant message. Parameters: arg3 - argument for locale dependant message. Parameters: arg4 - argument for locale dependant message. Parameters: arg5 - argument for locale dependant message. | public String | getProperty(String key) Gets a property value.
key. | public String | getProperty(String key, String dflt) Gets a property value.
Parameters: key - key. Parameters: dflt - default value. | public String | getString(String key) Returns an i18n message.
Parameters: key - i18n key. | public boolean | isEnd() Checks the application state.
none. | public void | setEnd() Declare that the application will exit soon.
main thread
none. |
Config | public Config() throws IOException(Code) | | Constructor.
Reads the configuration properties from the initialization file.
main thread
none. throws: IOException - file not found. |
getBundle | public ResourceBundle getBundle()(Code) | | Returns the i18n resource bundle associated with this configuration.
none. ResourceBundle resource bundle. |
getLocale | public Locale getLocale()(Code) | | Returns the locale associated with this configuration.
none. Locale locale. |
getPattern | public String getPattern(String key, Object[] params)(Code) | | Returns an i18n message.
Parameters: key - i18n key. Parameters: params - array of arguments to scatter in the i18n locale dependant message. String locale dependant message. |
getPattern | public String getPattern(String key, Object arg)(Code) | | Returns an i18n message.
Parameters: key - i18n key. Parameters: arg - argument for locale dependant message. String locale dependant message. |
getPattern | public String getPattern(String key, Object arg1, Object arg2)(Code) | | Returns an i18n message.
Parameters: key - i18n key. Parameters: arg1 - argument for locale dependant message. Parameters: arg2 - argument for locale dependant message. String locale dependant message. |
getPattern | public String getPattern(String key, Object arg1, Object arg2, Object arg3)(Code) | | Returns an i18n message.
Parameters: key - i18n key. Parameters: arg1 - argument for locale dependant message. Parameters: arg2 - argument for locale dependant message. Parameters: arg3 - argument for locale dependant message. String locale dependant message. |
getPattern | public String getPattern(String key, Object arg1, Object arg2, Object arg3, Object arg4)(Code) | | Returns an i18n message.
Parameters: key - i18n key. Parameters: arg1 - argument for locale dependant message. Parameters: arg2 - argument for locale dependant message. Parameters: arg3 - argument for locale dependant message. Parameters: arg4 - argument for locale dependant message. String locale dependant message. |
getPattern | public String getPattern(String key, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)(Code) | | Returns an i18n message.
Parameters: key - i18n key. Parameters: arg1 - argument for locale dependant message. Parameters: arg2 - argument for locale dependant message. Parameters: arg3 - argument for locale dependant message. Parameters: arg4 - argument for locale dependant message. Parameters: arg5 - argument for locale dependant message. String locale dependant message. |
getProperty | public String getProperty(String key)(Code) | | Gets a property value.
key. String property value. |
getProperty | public String getProperty(String key, String dflt)(Code) | | Gets a property value.
Parameters: key - key. Parameters: dflt - default value. String property value. |
getString | public String getString(String key)(Code) | | Returns an i18n message.
Parameters: key - i18n key. String locale dependant message. |
isEnd | public boolean isEnd()(Code) | | Checks the application state.
none. boolean application state. |
setEnd | public void setEnd()(Code) | | Declare that the application will exit soon.
main thread
none. void. |
|
|