| 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,
Method Summary | |
public void | addNotificationListener(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 void | bootstrap() | public String | deploy(String serviceUnitName, String serviceUnitRootPath) Deploy a Service Unit to the component. | public String | getComponentInfo() Return current version and other info about this component. | public ObjectName | getConfigurationMBean() Return the JMX ObjectName for this component's ConfigurationMBean
or null. | public ObjectName | getDefaultLoggerMBean() Return the ObjectName of the default LoggerMBean for this component. | public ObjectName | getDeployerMBean() Return the JMX ObjectName for this component's DeployerMBean or null. | public ObjectName | getExtensionMBeanName() Get the JMX object name for the extension MBean for this component; if
there is none, return null . | public String | getHelp() Return help text about this component. | public ComponentLifeCycle | getLifeCycle() Get the life cycle control interface for this component. | public ObjectName | getLifeCycleMBean() Return the JMX ObjectName for this component's LifeCycleMBean
or null. | public ObjectName | getLoggerMBeanByName(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 NotificationBroadcasterSupport | getNotificationBroadcaster() 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 Document | getServiceDescription(ServiceEndpoint endpoint) Retrieves a DOM representation containing metadata which describes the
service provided by this component, through the given endpoint. | public ServiceUnitManager | getServiceUnitManager() Get the Service Unit manager for this component. | public String | getcomponentName() | public void | init(ComponentContext context) Initialize the component. | public void | init(String serviceUnitName, String serviceUnitRootPath) Initialize the given deployed service unit. | protected void | initModelEngineComponent(javax.jbi.component.ComponentContext anEnv, JbiNameInfo aJbiName) allocate a logger, and then initialize the ModelEngineComponent. | protected void | initModelEngineComponent(javax.jbi.component.ComponentContext anEnv, Logger aLogger, JbiNameInfo aJbiName) Initialize the ModelEngineComponent. | public boolean | isExchangeWithConsumerOkay(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 boolean | isExchangeWithProviderOkay(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 String | messageDeployOkay() | public String | messageUnDeployOkay() | public void | removeNotificationListener(NotificationListener listener) Removes a listener from this MBean. | public void | removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) Removes a listener from this MBean. | public ServiceEndpoint | resolveEndpointReference(DocumentFragment epr) Resolve the given endpoint reference. | public void | shutDown() Shut down the component. | public void | shutDown(String serviceUnitName) Shut down the deployment. | public void | start() Start the component. | public void | start(String serviceUnitName) Start the deployed service unit. | public void | stop() Stop the component. | public void | stop(String serviceUnitName) Stop the deployed service unit. | public String | undeploy(String serviceUnitName, String serviceUnitRootPath) Undeploy a service unit from the component. |
mConfigMBeanName | protected ObjectName mConfigMBeanName(Code) | | JMX object names for standard mbeans:
|
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:
|
mInitialMBeansmStartMBeans | protected MBeanSet mInitialMBeansmStartMBeans(Code) | | |
mJbiNameInfo | protected JbiNameInfo mJbiNameInfo(Code) | | handle to jbi system or installed component identification:
|
mLogger | protected Logger mLogger(Code) | | Logger to be used by ModelEngineComponent methods:
|
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 null if 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. |
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. |
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. |
messageUnDeployOkay | public String messageUnDeployOkay()(Code) | | |
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. |
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(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. |
|
|