Java Doc for ComponentFramework.java in  » ESB » open-esb » com » sun » jbi » framework » 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 » ESB » open esb » com.sun.jbi.framework 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.jbi.framework.ComponentFramework

ComponentFramework
public class ComponentFramework implements com.sun.jbi.ComponentManager,com.sun.jbi.ServiceLifecycle(Code)
This is the implementation of the Component Framework, which provides for the installation, uninstallation, and runtime management of Binding Components, Service Engines, and Shared Libraries within the JBI framework.
author:
   Sun Microsystems, Inc.


Field Summary
final public static  intPREPARE
    
final public static  intSTART
    
final public static  intSTARTUP_ALL
     Startup type for auto startup of all installed components.
final public static  intSTARTUP_AUTO
     Startup type for auto startup of installed components that were running at the time of the last shutdown.
final public static  intSTARTUP_NONE
     Startup type for no startup of components.


Method Summary
public synchronized  voidcancelComponentUpgrade(String componentName)
     Cancel a pending component upgrade.
 voidcreateConfigurationMBean(Component comp)
     Create and register a Component Configuration MBean for a component.
 voidcreateLifeCycleMBean(Component comp)
     Create and register a LifeCycleMBean for a component.
 voidcreateStatisticsMBean(Component comp)
     Create and register a StatisticsMBean for a component.
public  javax.jbi.component.ComponentgetComponentInstance(String componentName)
     Get the instance of javax.jbi.component.Component for the specified component, if it exists.
Parameters:
  componentName - the unique name of the component.
public  DeployerMBeangetDeployerInstance(String componentName)
     Get the instance of com.sun.jbi.framework.DeployerMBean for the specified component, if it exists.
Parameters:
  componentName - the unique name of the component.
 ObjectNamegetInstallerConfigurationMBeanName(String componentName)
     Get the JMX ObjectName of the InstallerConfigurationMBean for a component.
Parameters:
  componentName - the unique name of the component.
 LoggergetLogger()
     Get the logger for this service.
public  voidinitService(com.sun.jbi.EnvironmentContext context)
     Initialize the Component Framework service.
 voidinitializeComponent(Component comp)
     Initialize a Component.
 voidinitializeComponent(Component comp, javax.jbi.component.ComponentLifeCycle compInstance)
     Initialize a Component.
synchronized  ObjectNameinstallComponent(InstallationContext installContext)
     Install a Component into the JBI framework.
Parameters:
  installContext - The InstallationContext created by theInstaller Service.
public synchronized  voidinstallSharedLibrary(String name, String description, String componentRoot, boolean isSelfFirst, List elements)
     Install a Shared Library into the JBI framework.
public synchronized  ObjectNameloadBootstrap(InstallationContext installContext, String bootClassName, List bootClassPathElements, List sharedLibraryNames)
     Load a component's bootstrap into the JBI framework.
 voidprepare()
     This method is called by the JBI framework at the very beginning of its startup so that components can create any local XAResources that might be needed for recovery.
 voidready(boolean wait)
     This method is called by the JBI framework at the very end of its starup processing to kick off the processing of component startup after any optional XAResource recovery processing has been completed.
 voidsetStartup(int startup)
     Set the startup type.
 voidshutdownComponent(Component comp)
     Shut down a Component.
 voidshutdownComponent(Component comp, boolean force)
     Shut down a Component.
 voidstartComponent(Component comp)
     Start a Component.
 voidstartComponent(Component comp, boolean startSUs)
     Start a Component.
public  voidstartService()
     Start the Component Framework service.
 voidstartupAll(int command)
     Perform automatic startup processing.
 voidstopComponent(Component comp)
     Stop a Component.
public  voidstopService()
     Stop the Component Framework service.
synchronized  voiduninstallComponent(InstallationContext installContext, boolean force)
     Uninstall a Component from the JBI framework.
public  voiduninstallSharedLibrary(String sharedLibraryName)
     Uninstall a Shared Library from the JBI framework.
public  voidunloadBootstrap(String componentName)
     Unload a component's bootstrap from the JBI framework.
 voidunregisterMBeans(Component comp)
     Unregister all the MBeans for a component.
public synchronized  voidupgradeComponent(InstallationContext installContext, String bootClassName, List<String> bootClassPathElements, List<String> sharedLibraryNames)
     Upgrade an installed component.
public synchronized  booleanvalidateComponentForUpgrade(InstallationContext installContext, String bootClassName, List bootClassPathElements, List sharedLibraryNames)
     Validate a component for upgrade.

Field Detail
PREPARE
final public static int PREPARE(Code)
Commands for startupAll()



START
final public static int START(Code)



STARTUP_ALL
final public static int STARTUP_ALL(Code)
Startup type for auto startup of all installed components.



STARTUP_AUTO
final public static int STARTUP_AUTO(Code)
Startup type for auto startup of installed components that were running at the time of the last shutdown.



STARTUP_NONE
final public static int STARTUP_NONE(Code)
Startup type for no startup of components.





Method Detail
cancelComponentUpgrade
public synchronized void cancelComponentUpgrade(String componentName) throws javax.jbi.JBIException(Code)
Cancel a pending component upgrade. This is called when some failure has occurred after validateComponentForUpgrade() has already been called but before upgradeComponent() is called. All this method does is return the component to the SHUTDOWN state and remove the busy indicator from the component entry in the runtime registry cache.
Parameters:
  componentName - The name of the component.
throws:
  javax.jbi.JBIException - if the component does not exist.



createConfigurationMBean
void createConfigurationMBean(Component comp) throws javax.jbi.JBIException(Code)
Create and register a Component Configuration MBean for a component.
Parameters:
  comp - The Component instance representing the component.
throws:
  javax.jbi.JBIException - If a failure occurs.



createLifeCycleMBean
void createLifeCycleMBean(Component comp) throws javax.jbi.JBIException(Code)
Create and register a LifeCycleMBean for a component.
Parameters:
  comp - The Component instance representing the component.
throws:
  javax.jbi.JBIException - If a failure occurs.



createStatisticsMBean
void createStatisticsMBean(Component comp) throws javax.jbi.JBIException(Code)
Create and register a StatisticsMBean for a component.
Parameters:
  comp - The Component instance representing the component.
throws:
  javax.jbi.JBIException - If a failure occurs.



getComponentInstance
public javax.jbi.component.Component getComponentInstance(String componentName)(Code)
Get the instance of javax.jbi.component.Component for the specified component, if it exists.
Parameters:
  componentName - the unique name of the component. the javax.jbi.component.Component instance or null if no suchcomponent exists or if the component is inactive.



getDeployerInstance
public DeployerMBean getDeployerInstance(String componentName)(Code)
Get the instance of com.sun.jbi.framework.DeployerMBean for the specified component, if it exists.
Parameters:
  componentName - the unique name of the component. the com.sun.jbi.framework.DeployerMBean instance or null if nosuch component exists or if the component has no Deployer instance.



getInstallerConfigurationMBeanName
ObjectName getInstallerConfigurationMBeanName(String componentName) throws javax.jbi.JBIException(Code)
Get the JMX ObjectName of the InstallerConfigurationMBean for a component.
Parameters:
  componentName - the unique name of the component. The JMX ObjectName of the InstallerConfigurationMBean.
throws:
  javax.jbi.JBIException - If the component is not found.



getLogger
Logger getLogger()(Code)
Get the logger for this service. The Logger instance.



initService
public void initService(com.sun.jbi.EnvironmentContext context) throws javax.jbi.JBIException(Code)
Initialize the Component Framework service.
Parameters:
  context - The JBI environment context created by the JBI framework.
throws:
  javax.jbi.JBIException - If an error occurs during initialization.



initializeComponent
void initializeComponent(Component comp) throws javax.jbi.JBIException(Code)
Initialize a Component.
Parameters:
  comp - The Component instance.
throws:
  javax.jbi.JBIException - If the initialization failed.



initializeComponent
void initializeComponent(Component comp, javax.jbi.component.ComponentLifeCycle compInstance) throws javax.jbi.JBIException(Code)
Initialize a Component.
Parameters:
  comp - The Component instance for this component.
Parameters:
  compInstance - The LifeCycle instance for this component.
throws:
  javax.jbi.JBIException - If the initialization failed.



installComponent
synchronized ObjectName installComponent(InstallationContext installContext) throws javax.jbi.JBIException(Code)
Install a Component into the JBI framework.
Parameters:
  installContext - The InstallationContext created by theInstaller Service. The MBean object name of the LifeCycle MBean for this component.
throws:
  javax.jbi.JBIException - If the installation fails.



installSharedLibrary
public synchronized void installSharedLibrary(String name, String description, String componentRoot, boolean isSelfFirst, List elements) throws javax.jbi.JBIException(Code)
Install a Shared Library into the JBI framework.
Parameters:
  name - The unique name assigned to this Shared Library.
Parameters:
  description - The description of the Shared Library.
Parameters:
  componentRoot - The root directory for the Shared Library.
Parameters:
  isSelfFirst - Set to true to force the class loader for this SharedLibrary to use a self-first hierarchy, or false for parent-first.
Parameters:
  elements - The list of jar and class files included in thisShared Library, in a List of Strings in the order in which theyshould appear in the class path.
throws:
  javax.jbi.JBIException - If the installation fails.



loadBootstrap
public synchronized ObjectName loadBootstrap(InstallationContext installContext, String bootClassName, List bootClassPathElements, List sharedLibraryNames) throws javax.jbi.JBIException(Code)
Load a component's bootstrap into the JBI framework. This is the first step in the installation and uninstallation processes. It creates and registers the ComponentInstaller MBean that is used to complete the installation or uninstallation.
Parameters:
  installContext - The InstallationContext created by the InstallerService.
Parameters:
  bootClassName - The name of the bootstrap class for the component.
Parameters:
  bootClassPathElements - A List of elements comprising theclass path for loading the bootstrap class. Each element is a Stringcontaining the full path to either a jar file or a directory containingclass files.
Parameters:
  sharedLibraryNames - A List of String objects containing the namesof the Shared Libraries required by the component. The MBean object name of an installation configuration MBean ornull if the component didn't provide one.
throws:
  javax.jbi.JBIException - If the component's bootstrap cannot beloaded.



prepare
void prepare()(Code)
This method is called by the JBI framework at the very beginning of its startup so that components can create any local XAResources that might be needed for recovery. If recovery is not enabled this phase will not be called. We wait for the prepare phase to complete before continuing. This method creats a new thread to run the ComponentStartup class, and starts the thread. The run() method of ComponentStartup will call startupAll() with the PREPARE option to perform the tasks required for components' XAResource recovery to proceed.



ready
void ready(boolean wait)(Code)
This method is called by the JBI framework at the very end of its starup processing to kick off the processing of component startup after any optional XAResource recovery processing has been completed. When the wait argument is set to true, the startupAll() method is called directly with the START option to perform automatic component startup processing. When the wait argument is set to false, this method creates a new thread to run the ComponentStartup class, and starts the thread. The run() method of ComponentStartup will call startupAll() with the START option to perform the automatic component startup processing.
Parameters:
  wait - when set to true, perform startup processing onthe current thread; when set to false, perform startupprocessing on a new thread.



setStartup
void setStartup(int startup)(Code)
Set the startup type. This is used in junit tests to allow the testing of service startup and shutdown with different component startup types.
Parameters:
  startup - The component startup type to be set.



shutdownComponent
void shutdownComponent(Component comp) throws javax.jbi.JBIException(Code)
Shut down a Component.
Parameters:
  comp - The Component instance representing the component.
throws:
  javax.jbi.JBIException - If the shutdown fails.



shutdownComponent
void shutdownComponent(Component comp, boolean force) throws javax.jbi.JBIException(Code)
Shut down a Component.
Parameters:
  comp - The Component instance representing the component.
Parameters:
  force - Set to true to force the shutdown even if the component'sshutDown method fails.
throws:
  javax.jbi.JBIException - If the shutdown fails.



startComponent
void startComponent(Component comp) throws javax.jbi.JBIException(Code)
Start a Component.
Parameters:
  comp - The Component instance representing the component.
throws:
  javax.jbi.JBIException - If the component cannot be started.



startComponent
void startComponent(Component comp, boolean startSUs) throws javax.jbi.JBIException(Code)
Start a Component.
Parameters:
  comp - The Component instance representing the component.
Parameters:
  startSUs - When true, also brings deployed SUs totheir desired states.
throws:
  javax.jbi.JBIException - If the component cannot be started.



startService
public void startService() throws javax.jbi.JBIException(Code)
Start the Component Framework service.
throws:
  javax.jbi.JBIException - If an error occurs starting the service.



startupAll
void startupAll(int command)(Code)
Perform automatic startup processing. This is where all installed Shared Libraries have their class loaders set up, and all components are brought to the desired state, based on the ComponentStartup property setting.



stopComponent
void stopComponent(Component comp) throws javax.jbi.JBIException(Code)
Stop a Component.
Parameters:
  comp - The Component instance representing the component.
throws:
  javax.jbi.JBIException - If the component cannot be stopped.



stopService
public void stopService() throws javax.jbi.JBIException(Code)
Stop the Component Framework service. All BCs and SEs that are still started are stopped and shut down here.
throws:
  javax.jbi.JBIException - If an error occurs stopping the service.



uninstallComponent
synchronized void uninstallComponent(InstallationContext installContext, boolean force) throws javax.jbi.JBIException(Code)
Uninstall a Component from the JBI framework.
Parameters:
  installContext - The InstallationContext created by theInstallation Service.
Parameters:
  force - Set to true to proceed with the uninstallregardless of any errors encountered.
throws:
  javax.jbi.JBIException - If the uninstall fails.



uninstallSharedLibrary
public void uninstallSharedLibrary(String sharedLibraryName) throws javax.jbi.JBIException(Code)
Uninstall a Shared Library from the JBI framework. A Shared Library cannot be uninstalled until all dependent components have been shut down. If any running dependent components are found, the uninstall of the Shared Library is aborted.
Parameters:
  sharedLibraryName - The unique name of the Shared Library.
throws:
  javax.jbi.JBIException - If the uninstall fails or is denied.



unloadBootstrap
public void unloadBootstrap(String componentName) throws javax.jbi.JBIException(Code)
Unload a component's bootstrap from the JBI framework. This is the last step in the installation and uninstallation processes. It unregisters the InstallerMBean that was used to complete the installation or uninstallation, and calls the bootstrap cleanUp() method if it has not yet been called. Note that in the case where this method is called after loadBootstrap() for a new component, without an intervening call to installComponent(), the Component instance is removed here.
Parameters:
  componentName - The unique name of the component.
throws:
  javax.jbi.JBIException - if the bootstrap cannot be unloaded.



unregisterMBeans
void unregisterMBeans(Component comp) throws javax.jbi.JBIException(Code)
Unregister all the MBeans for a component.
Parameters:
  comp - The Component instance representing the component.
throws:
  javax.jbi.JBIException - If a failure occurs.



upgradeComponent
public synchronized void upgradeComponent(InstallationContext installContext, String bootClassName, List<String> bootClassPathElements, List<String> sharedLibraryNames) throws javax.jbi.JBIException(Code)
Upgrade an installed component. This is used to upgrade a component to a newer version without requiring the component to be uninstalled (which requires undeployment of all Service Assemblies that have Service Units deployed to the component). There are two ways a component can be updated. If the component does not provide an upgrade() method in its bootstrap class, then the runtime jar files are updated and any changes to the component's installation descriptor in jbi.xml are propagated. If the component provides an upgrade() method, that method is called to give the component the opportunity to upgrade its workspace and all SUs deployed to it to a new version. In this case, it is the responsibility of the component to perform all version verification, and to provide any recovery processing required in the event of a failed upgrade.
Parameters:
  installContext - The InstallationContext created by the InstallerService.
Parameters:
  bootClassName - The name of the bootstrap class for the component.
Parameters:
  bootClassPathElements - A List of elements comprising theclass path for loading the bootstrap class. Each element is a Stringcontaining the full path to either a jar file or a directory containingclass files.
Parameters:
  sharedLibraryNames - A List of String objects containing the namesof the Shared Libraries required by the component.
throws:
  javax.jbi.JBIException - if the component cannot be updated forany reason.
throws:
  javax.jbi.JBIException - if the update fails for some reason.



validateComponentForUpgrade
public synchronized boolean validateComponentForUpgrade(InstallationContext installContext, String bootClassName, List bootClassPathElements, List sharedLibraryNames) throws javax.jbi.JBIException(Code)
Validate a component for upgrade. This validates that the runtime jar files provided for the upgrade contain valid implementations of the required interfaces and the component classes will load correctly. This also verifies that all Shared Library dependencies are met. It also determines whether or not the component has provided an implementation of the upgrade() method and returns an indicator of that to the caller.
Parameters:
  installContext - The InstallationContext created by the InstallerService.
Parameters:
  bootClassName - The name of the bootstrap class for the component.
Parameters:
  bootClassPathElements - A List of elements comprising theclass path for loading the bootstrap class. Each element is a Stringcontaining the full path to either a jar file or a directory containingclass files.
Parameters:
  sharedLibraryNames - A List of String objects containing the namesof the Shared Libraries required by the component. true if the component provided an upgrade() method in its bootstrap implementation, false if itdid not.
throws:
  javax.jbi.JBIException - if the component cannot be updated forany reason.



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.