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

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

public abstract class ComponentRuntime
extends 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:
Marco Piraccini
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.
 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(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 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(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 © 2005-2010 Imola Informatica. All Rights Reserved.