Java Doc for ConfigManager.java in  » Web-Services » xins » org » xins » server » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Services » xins » org.xins.server 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xins.server.ConfigManager

ConfigManager
final class ConfigManager (Code)
Manager for the runtime configuration file. Owns the watcher for the config file and is responsible for triggering actions when the file has actually changed.
version:
   $Revision: 1.60 $ $Date: 2007/09/18 08:45:05 $
author:
   Mees Witteman
author:
   Anthony Goubard
author:
   Ernst de Haan


Field Summary
final static  StringCONFIG_FILE_SYSTEM_PROPERTY
     The name of the system property that specifies the location of the configuration file.
final static  StringCONFIG_INCLUDE_PROPERTY
     The name of the runtime property that specifies the list of runtime properties file to include.
final static  StringCONFIG_RELOAD_INTERVAL_PROPERTY
     The name of the runtime property that specifies the interval for the configuration file modification checks, in seconds.
final static  intDEFAULT_CONFIG_RELOAD_INTERVAL
     The default configuration file modification check interval, in seconds.

Constructor Summary
 ConfigManager(Engine engine, ServletConfig config)
     Constructs a new ConfigManager object.

Method Summary
 voidconfigureLogger(Properties properties)
     Initializes the logging subsystem.
static  voidconfigureLoggerFallback()
     Initializes the logging subsystem with fallback default settings.
 voiddestroy()
     Stops the config file watcher thread.
 voiddetermineConfigFile()
     Determines the name of the runtime configuration file.
 intdetermineConfigReloadInterval()
     Determines the interval for checking the runtime properties file for modifications.
 booleandetermineLogLocale()
     Determines the log locale.
 PropertyReadergetRuntimeProperties()
     Gets the runtime properties.
 voidinit()
     Determines the reload interval for the config file, initializes the API if the interval has changed and starts the config file watcher.
 booleanpropertiesRead()
     Indicates whether the runtime property file was read successfully.
 voidreadRuntimeProperties()
     Unifies the file separator character on the _configFile property and then reads the runtime properties file, initializes the logging subsystem with the read properties and then stores those properties on the engine.
 voidreloadPropertiesIfChanged()
     Re-initializes the configuration file listener if there is no file watcher; otherwise interrupts the file watcher.
 voidstartConfigFileWatcher(int interval)
     Starts the runtime configuration file watch thread.

Field Detail
CONFIG_FILE_SYSTEM_PROPERTY
final static String CONFIG_FILE_SYSTEM_PROPERTY(Code)
The name of the system property that specifies the location of the configuration file.



CONFIG_INCLUDE_PROPERTY
final static String CONFIG_INCLUDE_PROPERTY(Code)
The name of the runtime property that specifies the list of runtime properties file to include. The paths must be relative to the current config file.



CONFIG_RELOAD_INTERVAL_PROPERTY
final static String CONFIG_RELOAD_INTERVAL_PROPERTY(Code)
The name of the runtime property that specifies the interval for the configuration file modification checks, in seconds.



DEFAULT_CONFIG_RELOAD_INTERVAL
final static int DEFAULT_CONFIG_RELOAD_INTERVAL(Code)
The default configuration file modification check interval, in seconds.




Constructor Detail
ConfigManager
ConfigManager(Engine engine, ServletConfig config) throws IllegalArgumentException(Code)
Constructs a new ConfigManager object.
Parameters:
  engine - the Engine that owns this ConfigManager, cannotbe null.
Parameters:
  config - the servlet configuration, cannot be null.
throws:
  IllegalArgumentException - if engine == null || config == null.




Method Detail
configureLogger
void configureLogger(Properties properties) throws IllegalArgumentException(Code)
Initializes the logging subsystem.
Parameters:
  properties - the runtime properties containing the settings for the loggingsubsystem, cannot be null.
throws:
  IllegalArgumentException - if properties == null.



configureLoggerFallback
static void configureLoggerFallback()(Code)
Initializes the logging subsystem with fallback default settings.



destroy
void destroy()(Code)
Stops the config file watcher thread.



determineConfigFile
void determineConfigFile()(Code)
Determines the name of the runtime configuration file. The system properties will be queried first. If they do not provide it, then the servlet initialization properties are tried. Once determined, the name will be stored internally.



determineConfigReloadInterval
int determineConfigReloadInterval() throws InvalidPropertyValueException(Code)
Determines the interval for checking the runtime properties file for modifications. the interval to use, always >= 1.
throws:
  InvalidPropertyValueException - if the interval cannot be determined because it does not qualify as apositive 32-bit unsigned integer number.



determineLogLocale
boolean determineLogLocale()(Code)
Determines the log locale. false if the specified locale is not supported,true otherwise.



getRuntimeProperties
PropertyReader getRuntimeProperties()(Code)
Gets the runtime properties. the runtime properties, never null.



init
void init()(Code)
Determines the reload interval for the config file, initializes the API if the interval has changed and starts the config file watcher.



propertiesRead
boolean propertiesRead()(Code)
Indicates whether the runtime property file was read successfully. true if the runtime properties are loaded correctly,false otherwise.



readRuntimeProperties
void readRuntimeProperties()(Code)
Unifies the file separator character on the _configFile property and then reads the runtime properties file, initializes the logging subsystem with the read properties and then stores those properties on the engine. If the _configFile is empty, then an empty set of properties is set on the engine.



reloadPropertiesIfChanged
void reloadPropertiesIfChanged()(Code)
Re-initializes the configuration file listener if there is no file watcher; otherwise interrupts the file watcher.



startConfigFileWatcher
void startConfigFileWatcher(int interval) throws IllegalStateException, IllegalArgumentException(Code)
Starts the runtime configuration file watch thread.
Parameters:
  interval - the interval in seconds, must be greater than or equal to 1.
throws:
  IllegalStateException - if no runtime configuration file is specified or if there is alreadya file watcher.
throws:
  IllegalArgumentException - if interval < 1.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.