Java Doc for Boot.java in  » Development » Java-Plugin-Framework » org » java » plugin » boot » 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 » Development » Java Plugin Framework » org.java.plugin.boot 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.java.plugin.boot.Boot

Boot
final public class Boot (Code)
Main class to get JPF based application running in different modes. Application mode may be specified as jpf.boot.mode configuration parameter or System property (via -Djpf.boot.mode= command line argument). Supported values are:
start
Runs application in "background" ("service") mode.
stop
Stops application, running in "background" mode.
restart
Restarts application, running in "background" mode. If it is not started, the action is the same as just starting application.
shell
Runs application in "shell" (or "interactive") mode. It is possible to control "service" style application from command line. Note, that already running application will be stopped first.
load
Only loads application but not starts it as in other modes. This mode is useful when doing application unit testing or when you only need to get initialized and ready to be started JPF environment.
The "shell" mode is default. Application will be started in this mode if no jpf.boot.mode configuration parameter can be found.

Application configuration is expected to be in Java properties format file. File look-up procedure is the following:

  • Check jpf.boot.config System property, if present, load configuration from that location
  • Look for boot.properties file in the current folder.
  • Look for boot.properties resource in classpath (using Boot.class.getClassLoader().getResource("boot.properties") and Boot.class.getResource("boot.properties") methods).

If configuration could not be found, a warning will be printed to console. It is generally not an error to not use configuration file, you may provide JPF configuration parameters as System properties. They are always used as defaults for configuration properties.

Note that configuration properties will be loaded using org.java.plugin.util.ExtendedProperties specially extended version of java.util.Properties class, which supports parameters substitution. If there is no applicationRoot property available in the given configuration, the current folder will be published as default value.

Standard configuration parameters are (all are optional when application is running in "shell" mode):

jpf.boot.mode
Application boot mode. Always available as System property also. Default value is shell.
org.java.plugin.boot.appInitializer
Application initializer class, for details see org.java.plugin.boot.ApplicationInitializer . Default is org.java.plugin.boot.DefaultApplicationInitializer .
org.java.plugin.boot.errorHandler
Error handler class, for details see org.java.plugin.boot.BootErrorHandler . Default is org.java.plugin.boot.BootErrorHandlerConsole for "service" style applications and org.java.plugin.boot.BootErrorHandlerGui for "interactive" applications.
org.java.plugin.boot.controlHost
Host to be used by background control service, no default values.
org.java.plugin.boot.controlPort
Port number to be used by background control service, no default values.
org.java.plugin.boot.splashHandler
Splash screen handler class, for details see org.java.plugin.boot.SplashHandler . Default is simple splash handler that can only display an image.
org.java.plugin.boot.splashImage
Path to an image file to be shown as splash screen. This may be any valid URL. If no file and no handler given, the splash screen will not be shown.
org.java.plugin.boot.splashLeaveVisible
If set to true, the Boot class will not hide splash screen at the end of boot procedure but delegate this function to application code. Default value is false.
org.java.plugin.boot.splashDisposeOnHide
If set to false, the Boot class will not dispose splash screen handler when hiding it. This allows you to reuse handler and show splash screen back after it was hidden. Default value is true.

version:
   $Id$


Field Summary
final public static  StringBOOT_ERROR_FILE_NAME
     Name of the file, where to put boot error details.
final public static  StringBOOT_MODE_LOAD
     "load" mode boot command value.
final public static  StringBOOT_MODE_RESTART
     "restart" mode boot command value.
final public static  StringBOOT_MODE_SHELL
     "shell" mode boot command value.
final public static  StringBOOT_MODE_START
     "start" mode boot command value.
final public static  StringBOOT_MODE_STOP
     "stop" mode boot command value.
final static  StringPACKAGE_NAME
    
final public static  StringPROP_BOOT_CONFIG
     Boot configuration file location System property name.
final public static  StringPROP_BOOT_MODE
     Boot mode System property name.
static  SplashHandlersplashHandler
    


Method Summary
public static  Applicationboot(ExtendedProperties config, boolean useControlService, String mode, BootErrorHandler errorHandler, String[] args)
     Boots application according to given configuration data.
public static  SplashHandlergetSplashHandler()
     Returns current instance of splash screen handler if it is available or null.
public static  voidmain(String[] args)
     Call this method to start/stop application.
public static  voidsetSplashHandler(SplashHandler handler)
    
public static  voidstopApplication(Application application)
     Stops the application, shuts down plug-in manager and disposes log service.

Field Detail
BOOT_ERROR_FILE_NAME
final public static String BOOT_ERROR_FILE_NAME(Code)
Name of the file, where to put boot error details.



BOOT_MODE_LOAD
final public static String BOOT_MODE_LOAD(Code)
"load" mode boot command value.



BOOT_MODE_RESTART
final public static String BOOT_MODE_RESTART(Code)
"restart" mode boot command value.



BOOT_MODE_SHELL
final public static String BOOT_MODE_SHELL(Code)
"shell" mode boot command value.



BOOT_MODE_START
final public static String BOOT_MODE_START(Code)
"start" mode boot command value.



BOOT_MODE_STOP
final public static String BOOT_MODE_STOP(Code)
"stop" mode boot command value.



PACKAGE_NAME
final static String PACKAGE_NAME(Code)



PROP_BOOT_CONFIG
final public static String PROP_BOOT_CONFIG(Code)
Boot configuration file location System property name.



PROP_BOOT_MODE
final public static String PROP_BOOT_MODE(Code)
Boot mode System property name.



splashHandler
static SplashHandler splashHandler(Code)





Method Detail
boot
public static Application boot(ExtendedProperties config, boolean useControlService, String mode, BootErrorHandler errorHandler, String[] args) throws Exception(Code)
Boots application according to given configuration data.
Parameters:
  config - boot configuration data
Parameters:
  useControlService - if true, the control service willstarted to allow handling application instancefrom another process
Parameters:
  mode - application run mode
Parameters:
  errorHandler - boot errors handler instance
Parameters:
  args - command line arguments, not interpreted by this method butpassed toApplicationPlugin.initApplication(ExtendedPropertiesString[])method initialized application instance or null
throws:
  Exception - if any un-handled error has occurred



getSplashHandler
public static SplashHandler getSplashHandler()(Code)
Returns current instance of splash screen handler if it is available or null. instance of splash handler or null if no activeinstance available



main
public static void main(String[] args)(Code)
Call this method to start/stop application.
Parameters:
  args - command line arguments, not interpreted by this method butpassed toApplicationPlugin.initApplication(ExtendedPropertiesString[])method



setSplashHandler
public static void setSplashHandler(SplashHandler handler)(Code)

Parameters:
  handler - the new splash handler instance to set ornull to dispose current handler directly



stopApplication
public static void stopApplication(Application application) throws Exception(Code)
Stops the application, shuts down plug-in manager and disposes log service. Call this method before exiting interactive application. For service applications this method will be called automatically by control service or from shell.
Parameters:
  application - application instance being stopped
throws:
  Exception - if any error has occurred during application stopping



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.