it.imolinfo.jbi4ejb.jbi.component.runtime
Class ComponentRuntime

java.lang.Object
  extended by it.imolinfo.jbi4ejb.jbi.component.runtime.ComponentRuntime
All Implemented Interfaces:
javax.jbi.component.Component
Direct Known Subclasses:
Jbi4EjbRuntime

public abstract class ComponentRuntime
extends java.lang.Object
implements javax.jbi.component.Component

This is the Base implementation of the Component apis. Each component will extend this class to provide the component specific implemenation of the api by overriding the default implemenation or providing the implemenation of the create methods for ComponentLifecycle and ServiceUnitManager.

Author:
Sun Microsystems, Inc.
See Also:
javax.jbi.Component

Constructor Summary
protected ComponentRuntime()
          constructor
 
Method Summary
protected abstract  javax.jbi.component.ComponentLifeCycle createComponentLifeCycle()
          return the ComponentLifeCycle implementaion.
protected abstract  javax.jbi.component.ServiceUnitManager createServiceUnitManager()
          if this component supports service unit deployment, then return the service unit manager, else return null
 javax.jbi.component.ComponentLifeCycle getLifeCycle()
          Get the life cycle control interface for this component.
 org.w3c.dom.Document getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint ref)
          Retrieves a DOM representation containing metadata which describes the service provided by this component, through the given endpoint.
 javax.jbi.component.ServiceUnitManager getServiceUnitManager()
          Get the Service Unit manager for this component.
 boolean isExchangeWithConsumerOkay(javax.jbi.servicedesc.ServiceEndpoint endpoint, javax.jbi.messaging.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.
 boolean isExchangeWithProviderOkay(javax.jbi.servicedesc.ServiceEndpoint endpoint, javax.jbi.messaging.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.
 javax.jbi.servicedesc.ServiceEndpoint resolveEndpointReference(org.w3c.dom.DocumentFragment epr)
          Resolve the given endpoint reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentRuntime

protected ComponentRuntime()
constructor

Method Detail

getLifeCycle

public final javax.jbi.component.ComponentLifeCycle getLifeCycle()
Get the life cycle control interface for this component.

Specified by:
getLifeCycle in interface javax.jbi.component.Component
Returns:
the life cycle control interface for this component
See Also:
javax.jbi.Component#getLifeCycle()

getServiceUnitManager

public final javax.jbi.component.ServiceUnitManager getServiceUnitManager()
Get the Service Unit manager for this component.

Specified by:
getServiceUnitManager in interface javax.jbi.component.Component
Returns:
the ServiceUnitManager for this component, or null if there is none.
See Also:
javax.jbi.Component#getServiceUnitManager()

getServiceDescription

public org.w3c.dom.Document getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint ref)
Retrieves a DOM representation containing metadata which describes the service provided by this component, through the given endpoint.

Specified by:
getServiceDescription in interface javax.jbi.component.Component
Parameters:
endpoint - the service endpoint.
Returns:
the description for the specified service endpoint.
See Also:
javax.jbi.Component#getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint)

isExchangeWithConsumerOkay

public boolean isExchangeWithConsumerOkay(javax.jbi.servicedesc.ServiceEndpoint endpoint,
                                          javax.jbi.messaging.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.

Specified by:
isExchangeWithConsumerOkay in interface javax.jbi.component.Component
Parameters:
endpoint - the endpoint to be used by the consumer; must be non-null.
exchange - the proposed message exchange to be performed; must be non-null.
Returns:
true if this provider component can perform the given exchange with the described consumer.

isExchangeWithProviderOkay

public boolean isExchangeWithProviderOkay(javax.jbi.servicedesc.ServiceEndpoint endpoint,
                                          javax.jbi.messaging.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. The provider is described by the given endpoint and the service description supplied by that endpoint.

Specified by:
isExchangeWithProviderOkay in interface javax.jbi.component.Component
Parameters:
endpoint - the endpoint to be used by the provider; must be non-null.
exchange - the proposed message exchange to be performed; must be non-null.
Returns:
true if this consumer component can interact with the described provider to perform the given exchange.

resolveEndpointReference

public javax.jbi.servicedesc.ServiceEndpoint resolveEndpointReference(org.w3c.dom.DocumentFragment epr)
Resolve the given endpoint reference.

Specified by:
resolveEndpointReference in interface javax.jbi.component.Component
Parameters:
epr - the endpoint reference, in some XML dialect understood by the appropriate component (usually a binding); must be non-null.
Returns:
the service endpoint for the EPR; null if the EPR cannot be resolved by this component.
See Also:
javax.jbi.Component#resolveEndpointReference(org.w3c.dom.DocumentFragment)

createComponentLifeCycle

protected abstract javax.jbi.component.ComponentLifeCycle createComponentLifeCycle()
return the ComponentLifeCycle implementaion. if returned null, the DefaultComponentLifeCycle will be used as the component lifecycle


createServiceUnitManager

protected abstract javax.jbi.component.ServiceUnitManager createServiceUnitManager()
if this component supports service unit deployment, then return the service unit manager, else return null



Copyright © 2007-2008 Imola Informatica. All Rights Reserved.