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


java.lang.Object
   com.sun.jbi.management.engine.ModelEngineComponent

All known Subclasses:   localews.src.com.athena.jbi.localews.engine.LocalizationServiceController,  mathlib1.src.com.acme.jbi.mathlib.engine.MathLibraryServiceController,  calc.src.com.abc.jbi.calculator.engine.CalculatorServiceController,  mathlib2.src.com.zol.jbi.mathlib.engine.MathLibraryServiceController,
ModelEngineComponent
abstract public class ModelEngineComponent implements Component,ControllerMBean,ComponentLifeCycle,ServiceUnitManager,NotificationEmitter(Code)
The ModelEngineComponent implements the management controls for a standard JBI Framework engine component, and can be extended to provide a full engine implementation.
author:
   Sun Microsystems, Inc.


Field Summary
protected  ObjectNamemConfigMBeanName
    
protected  ObjectNamemControllerMBeanName
    
protected  ObjectNamemDeployerMBeanName
    
protected  StringmDisplayName
    
protected  com.sun.jbi.component.ComponentContextmEnv
    
protected  MBeanSetmInitialMBeansmStartMBeans
    
protected  JbiNameInfomJbiNameInfo
    
protected  ObjectNamemLifeCycleMBeanName
    
protected  LoggermLogger
    
protected  ObjectNamemLoggerMBeanName
    
protected  com.sun.jbi.management.MBeanNamesmMBeanNames
    
protected  MBeanServermMBeanServer
    
final protected  StringmModelName
    
protected  StringTranslatormTranslator
    


Method Summary
public  voidaddNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
     Adds a listener to this MBean.
Parameters:
  listener - The listener object which will handle thenotifications emitted by the broadcaster.
Parameters:
  filter - The filter object.
protected  voidbootstrap()
    
public  Stringdeploy(String serviceUnitName, String serviceUnitRootPath)
     Deploy a Service Unit to the component.
public  StringgetComponentInfo()
     Return current version and other info about this component.
public  ObjectNamegetConfigurationMBean()
     Return the JMX ObjectName for this component's ConfigurationMBean or null.
public  ObjectNamegetDefaultLoggerMBean()
     Return the ObjectName of the default LoggerMBean for this component.
public  ObjectNamegetDeployerMBean()
     Return the JMX ObjectName for this component's DeployerMBean or null.
public  ObjectNamegetExtensionMBeanName()
     Get the JMX object name for the extension MBean for this component; if there is none, return null.
public  StringgetHelp()
     Return help text about this component.
public  ComponentLifeCyclegetLifeCycle()
     Get the life cycle control interface for this component.
public  ObjectNamegetLifeCycleMBean()
     Return the JMX ObjectName for this component's LifeCycleMBean or null.
public  ObjectNamegetLoggerMBeanByName(String aLoggerName)
     Return the ObjectName for LoggerMBean named aLoggerName, or null, if the named logger does not exist in this component.
public  ObjectName[]getLoggerMBeans()
     Return the ObjectNames for all of the LoggerMBean's for this component.
public  NotificationBroadcasterSupportgetNotificationBroadcaster()
     Getter for local NotificationBroadcaster.
public  MBeanNotificationInfo[]getNotificationInfo()
    

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

It is not illegal for the MBean to send notifications not described in this array.

public  DocumentgetServiceDescription(ServiceEndpoint endpoint)
     Retrieves a DOM representation containing metadata which describes the service provided by this component, through the given endpoint.
public  ServiceUnitManagergetServiceUnitManager()
     Get the Service Unit manager for this component.
public  StringgetcomponentName()
    
public  voidinit(ComponentContext context)
     Initialize the component.
public  voidinit(String serviceUnitName, String serviceUnitRootPath)
     Initialize the given deployed service unit.
protected  voidinitModelEngineComponent(javax.jbi.component.ComponentContext anEnv, JbiNameInfo aJbiName)
     allocate a logger, and then initialize the ModelEngineComponent.
protected  voidinitModelEngineComponent(javax.jbi.component.ComponentContext anEnv, Logger aLogger, JbiNameInfo aJbiName)
     Initialize the ModelEngineComponent.
public  booleanisExchangeWithConsumerOkay(ServiceEndpoint endpoint, MessageExchange exchange)
     This method is called by JBI to check if this component, in the role of provider of the service indicated by the given exchange, can actually perform the operation desired.
public  booleanisExchangeWithProviderOkay(ServiceEndpoint endpoint, MessageExchange exchange)
     This method is called by JBI to check if this component, in the role of consumer of the service indicated by the given exchange, can actually interact with the provider properly.
public  StringmessageDeployOkay()
    
public  StringmessageUnDeployOkay()
    
public  voidremoveNotificationListener(NotificationListener listener)
     Removes a listener from this MBean.
public  voidremoveNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
    

Removes a listener from this MBean.

public  ServiceEndpointresolveEndpointReference(DocumentFragment epr)
     Resolve the given endpoint reference.
public  voidshutDown()
     Shut down the component.
public  voidshutDown(String serviceUnitName)
     Shut down the deployment.
public  voidstart()
     Start the component.
public  voidstart(String serviceUnitName)
     Start the deployed service unit.
public  voidstop()
     Stop the component.
public  voidstop(String serviceUnitName)
     Stop the deployed service unit.
public  Stringundeploy(String serviceUnitName, String serviceUnitRootPath)
     Undeploy a service unit from the component.

Field Detail
mConfigMBeanName
protected ObjectName mConfigMBeanName(Code)
JMX object names for standard mbeans:



mControllerMBeanName
protected ObjectName mControllerMBeanName(Code)



mDeployerMBeanName
protected ObjectName mDeployerMBeanName(Code)
JMX object names for component-only mbeans:



mDisplayName
protected String mDisplayName(Code)
User-friendly display name to be used by ModelEngineComponent methods:



mEnv
protected com.sun.jbi.component.ComponentContext mEnv(Code)



mInitialMBeansmStartMBeans
protected MBeanSet mInitialMBeansmStartMBeans(Code)



mJbiNameInfo
protected JbiNameInfo mJbiNameInfo(Code)
handle to jbi system or installed component identification:



mLifeCycleMBeanName
protected ObjectName mLifeCycleMBeanName(Code)



mLogger
protected Logger mLogger(Code)
Logger to be used by ModelEngineComponent methods:



mLoggerMBeanName
protected ObjectName mLoggerMBeanName(Code)



mMBeanNames
protected com.sun.jbi.management.MBeanNames mMBeanNames(Code)
handle to our MBean Namer:



mMBeanServer
protected MBeanServer mMBeanServer(Code)
handle to our MBean Server:



mModelName
final protected String mModelName(Code)



mTranslator
protected StringTranslator mTranslator(Code)
Handle to StringTranslator for message translation:





Method Detail
addNotificationListener
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws java.lang.IllegalArgumentException(Code)
Adds a listener to this MBean.
Parameters:
  listener - The listener object which will handle thenotifications emitted by the broadcaster.
Parameters:
  filter - The filter object. If filter is null, nofiltering will be performed before handling notifications.
Parameters:
  handback - An opaque object to be sent back to thelistener when a notification is emitted. This object cannot beused by the Notification broadcaster object. It should beresent unchanged with the notification to the listener.
exception:
  IllegalArgumentException - Listener parameter is null.
See Also:   ModelEngineComponent.removeNotificationListener



bootstrap
protected void bootstrap()(Code)
perform one-time startup tasks for this model



deploy
public String deploy(String serviceUnitName, String serviceUnitRootPath) throws DeploymentException(Code)
Deploy a Service Unit to the component. This is called by the JBI implementation in order to deploy the given artifact to the implementing component.

Upon successful deployment, a non-empty result string must be returned, that starts with the JBI-defined component-task-result element. For example:

 <component-task-result>
 <component-name>BC1</component-name>
 <component-task-result-details
 xmlns="http://java.sun.com/xml/ns/jbi/management-message">
 <task-result-details>
 <task-id>deploy</task-id>
 <task-result>SUCCESS</task-result>
 </task-result-details>
 </component-task-result-details>
 </component-task-result>
 
A failed deployment of the service unit must be reported using the component-task-result element as well; the task-result must be set to FAILED.
Parameters:
  serviceUnitName - name of the service unit being deployed; must benon-null and non-empty and unique among service units alreadydeployed to the component.
Parameters:
  serviceUnitRootPath - path of the service unit artifact root, inplatform specific format; must be non-null and non-empty. a deployment status message, which is an XML string that conformsto the schema given in the MBean Status and Result Stringssection of the Management chapter of the JBIspecification; must be non-null and non-empty.
exception:
  DeploymentException - if the deployment operation isunsuccessful.



getComponentInfo
public String getComponentInfo()(Code)
Return current version and other info about this component. info String



getConfigurationMBean
public ObjectName getConfigurationMBean()(Code)
Return the JMX ObjectName for this component's ConfigurationMBean or null. the JMX ObjectName for this component's ConfigurationMBeanor null.



getDefaultLoggerMBean
public ObjectName getDefaultLoggerMBean()(Code)
Return the ObjectName of the default LoggerMBean for this component. ObjectName of default LoggerMBean or null.



getDeployerMBean
public ObjectName getDeployerMBean()(Code)
Return the JMX ObjectName for this component's DeployerMBean or null. the JMX ObjectName for this component's DeployerMBean or null.



getExtensionMBeanName
public ObjectName getExtensionMBeanName()(Code)
Get the JMX object name for the extension MBean for this component; if there is none, return null. the JMX object name of the additional MBean or nullif there is no additional MBean.



getHelp
public String getHelp()(Code)
Return help text about this component. help text about this component.



getLifeCycle
public ComponentLifeCycle getLifeCycle()(Code)
Get the life cycle control interface for this component. This interface allows the JBI implementation to control the running state of this component.

This method must be called before any other methods of this interface are called. In addition, the JBI implementation must call the init() method of the component life cycle returned by this method before calling any other methods on this interface, or the component life cycle interface. the life cycle control interface for this component; must benon-null.




getLifeCycleMBean
public ObjectName getLifeCycleMBean()(Code)
Return the JMX ObjectName for this component's LifeCycleMBean or null. the JMX ObjectName for this component's LifeCycleMBeanor null.



getLoggerMBeanByName
public ObjectName getLoggerMBeanByName(String aLoggerName)(Code)
Return the ObjectName for LoggerMBean named aLoggerName, or null, if the named logger does not exist in this component. ObjectName of LoggerMBean.



getLoggerMBeans
public ObjectName[] getLoggerMBeans()(Code)
Return the ObjectNames for all of the LoggerMBean's for this component. array of ObjectName, possibly of zero length.



getNotificationBroadcaster
public NotificationBroadcasterSupport getNotificationBroadcaster()(Code)
Getter for local NotificationBroadcaster. NotificationBroadcaster



getNotificationInfo
public MBeanNotificationInfo[] getNotificationInfo()(Code)

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.

the array of possible notifications.



getServiceDescription
public Document getServiceDescription(ServiceEndpoint endpoint)(Code)
Retrieves a DOM representation containing metadata which describes the service provided by this component, through the given endpoint. The result can use WSDL 1.1 or WSDL 2.0.
Parameters:
  endpoint - the service endpoint. the description for the specified service endpoint.



getServiceUnitManager
public ServiceUnitManager getServiceUnitManager()(Code)
Get the Service Unit manager for this component. If this component does not support deployments, it must return null. the ServiceUnitManager for this component, ornull if there is none.



getcomponentName
public String getcomponentName()(Code)
Return the componentName the componentName



init
public void init(ComponentContext context) throws JBIException(Code)
Initialize the component. This performs initialization required by the component but does not make it ready to process messages. This method is called once for each life cycle of the component.

If the component needs to register an additional MBean to extend its life cycle, or provide other component management tasks, it should be registered during this call.
Parameters:
  context - the component's context, providing access to componentdata provided by the JBI environment; must be non-null.
exception:
  JBIException - if the component is unable to initialize.




init
public void init(String serviceUnitName, String serviceUnitRootPath) throws DeploymentException(Code)
Initialize the given deployed service unit. This is the first phase of a two-phase start, where the component must prepare to receive service requests related to the deployment (if any).

The serviceUnitRootPath parameter is provided to facilitate restart of the component. This allows simple components to rely entirely on JBI's ability to persist deployment information, avoiding the need for the component to provide its own persistence mechanism.
Parameters:
  serviceUnitName - name of the service unit being initialized; mustbe non-null, non-empty, and match the name of a previouslydeployed (but not yet undeployed) service unit.
Parameters:
  serviceUnitRootPath - path of the service unit artifact root, inplatform specific format; must be non-null and non-empty.
exception:
  DeploymentException - if the service unit is not deployed, orif it is in an incorrect state.




initModelEngineComponent
protected void initModelEngineComponent(javax.jbi.component.ComponentContext anEnv, JbiNameInfo aJbiName)(Code)
allocate a logger, and then initialize the ModelEngineComponent.



initModelEngineComponent
protected void initModelEngineComponent(javax.jbi.component.ComponentContext anEnv, Logger aLogger, JbiNameInfo aJbiName)(Code)
Initialize the ModelEngineComponent. This does not register any mbeans.



isExchangeWithConsumerOkay
public boolean isExchangeWithConsumerOkay(ServiceEndpoint endpoint, MessageExchange exchange)(Code)
This method is called by JBI to check if this component, in the role of provider of the service indicated by the given exchange, can actually perform the operation desired.
Parameters:
  endpoint - the endpoint to be used by the consumer; must benon-null.
Parameters:
  exchange - the proposed message exchange to be performed; must benon-null. true if this provider component can perform thegiven exchange with the described consumer.



isExchangeWithProviderOkay
public boolean isExchangeWithProviderOkay(ServiceEndpoint endpoint, MessageExchange exchange)(Code)
This method is called by JBI to check if this component, in the role of consumer of the service indicated by the given exchange, can actually interact with the provider properly. The provider is described by the given endpoint and the service description supplied by that endpoint.
Parameters:
  endpoint - the endpoint to be used by the provider; must benon-null.
Parameters:
  exchange - the proposed message exchange to be performed; must benon-null. true if this consumer component can interact withthe described provider to perform the given exchange.



messageDeployOkay
public String messageDeployOkay()(Code)



messageUnDeployOkay
public String messageUnDeployOkay()(Code)



removeNotificationListener
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException(Code)
Removes a listener from this MBean. If the listener has been registered with different handback objects or notification filters, all entries corresponding to the listener will be removed.
Parameters:
  listener - A listener that was previously added to thisMBean.
exception:
  ListenerNotFoundException - The listener is notregistered with the MBean.
See Also:   ModelEngineComponent.addNotificationListener
See Also:   NotificationEmitter.removeNotificationListener



removeNotificationListener
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException(Code)

Removes a listener from this MBean. The MBean must have a listener that exactly matches the given listener, filter, and handback parameters. If there is more than one such listener, only one is removed.

The filter and handback parameters may be null if and only if they are null in a listener to be removed.


Parameters:
  listener - A listener that was previously added to thisMBean.
Parameters:
  filter - The filter that was specified when the listenerwas added.
Parameters:
  handback - The handback that was specified when the listener wasadded.
exception:
  ListenerNotFoundException - The listener is notregistered with the MBean, or it is not registered with thegiven filter and handback.



resolveEndpointReference
public ServiceEndpoint resolveEndpointReference(DocumentFragment epr)(Code)
Resolve the given endpoint reference. This is called by JBI when it is attempting to resolve the given EPR on behalf of a component.

If this component returns a non-null result, it must conform to the following:

  • This component implements the ServiceEndpoint returned.
  • The result must not be registered or activated with the JBI implementation.
Dynamically resolved endpoints are distinct from static ones; they must not be activated (see ComponentContext.activateEndpoint(QNameString) ), nor registered (see ComponentContext ) by components. They can only be used to address message exchanges; the JBI implementation must deliver such exchanges to the component that resolved the endpoint reference (see ComponentContext.resolveEndpointReference(DocumentFragment) ).
Parameters:
  epr - the endpoint reference, in some XML dialect understood bythe appropriate component (usually a binding); must be non-null. the service endpoint for the EPR; null if theEPR cannot be resolved by this component.



shutDown
public void shutDown() throws JBIException(Code)
Shut down the component. This performs clean-up, releasing all run-time resources used by the component. Once this method has been called, ModelEngineComponent.init(ComponentContext) must be called before the component can be started again with a call to ModelEngineComponent.start() .
exception:
  JBIException - if the component is unable to shut down.



shutDown
public void shutDown(String serviceUnitName) throws DeploymentException(Code)
Shut down the deployment. This causes the deployment to return to the to the state it was in after ModelEngineComponent.deploy(String,String) , and before ModelEngineComponent.init(String,String) .
Parameters:
  serviceUnitName - name of the service unit being shut down; mustbe non-null, non-empty, and match the name of a previouslydeployed (but not yet undeployed) service unit.
exception:
  DeploymentException - if the service unit is not deployed, orif it is in an incorrect state.



start
public void start() throws JBIException(Code)
Start the component. This makes the component ready to process messages. This method is called after ModelEngineComponent.init(ComponentContext) , both when the component is being started for the first time and when the component is being restarted after a previous call to ModelEngineComponent.shutDown() . If ModelEngineComponent.stop() was called previously but ModelEngineComponent.shutDown() was not, start() can be called again without another call to ModelEngineComponent.init(ComponentContext) .
exception:
  JBIException - if the component is unable to start.



start
public void start(String serviceUnitName) throws DeploymentException(Code)
Start the deployed service unit. This is the second phase of a two-phase start, where the component can now initiate service requests related to the deployment.
Parameters:
  serviceUnitName - the name of the service unit being started; mustbe non-null, non-empty, and match the name of a previouslydeployed (but not yet undeployed) service unit.
exception:
  DeploymentException - if the service unit is not deployed, orif it is in an incorrect state.



stop
public void stop() throws JBIException(Code)
Stop the component. This makes the component stop accepting messages for processing. After a call to this method, ModelEngineComponent.start() may be called again without first calling ModelEngineComponent.init(ComponentContext) .
exception:
  JBIException - if the component is unable to stop.



stop
public void stop(String serviceUnitName) throws DeploymentException(Code)
Stop the deployed service unit. This causes the component to cease generating service requests related to the given service unit. This returns the service unit to a state equivalent to after ModelEngineComponent.init(String,String) was called.
Parameters:
  serviceUnitName - name of the service unit being stopped; mustbe non-null, non-empty, and match the name of a previouslydeployed (but not yet undeployed) service unit.
exception:
  DeploymentException - if the service unit is not deployed, orif it is in an incorrect state.



undeploy
public String undeploy(String serviceUnitName, String serviceUnitRootPath) throws DeploymentException(Code)
Undeploy a service unit from the component. The service unit must be shut down to undeploy it.
Parameters:
  serviceUnitName - name of the service unit being undeployed; mustbe non-null, non-empty, and match the name of a previouslydeployed (but not yet undeployed) service unit.
Parameters:
  serviceUnitRootPath - path of the service unit artifact root, inplatform specific format; must be non-null and non-empty. deployment status message, which is an XML string that conformsto the component-task-result type fromthe schema given in the MBean Status and Result Stringssection of the Management chapter of the JBIspecification; must be non-null and non-empty.
exception:
  DeploymentException - if undeployment operation is unsuccessful,or if the service unit is in an incorrect state.



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.