org.apache.ode.jbi

## Class OdeComponent

- java.lang.Object
- - org.apache.ode.jbi.OdeComponent

- All Implemented Interfaces:
    javax.jbi.component.Component

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

  This class implements `Component` interface.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OdeComponent()`
    `OdeComponent(OdeLifeCycle lifeCycle)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.jbi.component.ComponentLifeCycle` | `getLifeCycle()`
    `org.w3c.dom.Document` | `getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint ref)`
    `javax.jbi.component.ServiceUnitManager` | `getServiceUnitManager()`
    `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 the provider completely.
    `javax.jbi.servicedesc.ServiceEndpoint` | `resolveEndpointReference(org.w3c.dom.DocumentFragment epr)` Resolve the given endpoint reference, given the capabilities of the given consumer.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OdeComponent

          public OdeComponent()

    - #### OdeComponent

          public OdeComponent(OdeLifeCycle lifeCycle)

  - ### Method Detail

    - #### getLifeCycle

          public javax.jbi.component.ComponentLifeCycle getLifeCycle()

      Specified by:
        `getLifeCycle` in interface `javax.jbi.component.Component`

    - #### getServiceUnitManager

          public javax.jbi.component.ServiceUnitManager getServiceUnitManager()

      Specified by:
        `getServiceUnitManager` in interface `javax.jbi.component.Component`

    - #### getServiceDescription

          public org.w3c.dom.Document getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint ref)

      Specified by:
        `getServiceDescription` in interface `javax.jbi.component.Component`
      Parameters:
        `ref` - ServiceEndpoint object
      Returns:
        Descriptor Object implementing `javax.jbi.servicedesc.Descriptor` interface.

    - #### 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. The consumer is described by the given capabilities, and JBI has already ensured that a fit exists between the set of required capabilities of the provider and the available capabilities of the consumer, and vice versa. This matching consists of simple set matching based on capability names only.
      Note that JBI assures matches on capability names only; it is the responsibility of this method to examine capability values to ensure a match with the consumer.
      Specified by:
        `isExchangeWithConsumerOkay` in interface `javax.jbi.component.Component`
      Parameters:
        `endpoint` - the endpoint to be used by the consumer
        `exchange` - the proposed message exchange to be performed
      Returns:
        true if this provider component can perform the 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 the provider completely. Ths provider is described by the given capabilities, and JBI has already ensure that a fit exists between the set of required capabilities of the consumer and the available capabilities of the provider, and vice versa. This matching consists of simple set matching based on capability names only.
      Note that JBI assures matches on capability names only; it is the responsibility of this method to examine capability values to ensure a match with the provider.
      Specified by:
        `isExchangeWithProviderOkay` in interface `javax.jbi.component.Component`
      Parameters:
        `exchange` - the proposed message exchange to be performed
      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, given the capabilities of the given consumer. This is called by JBI when it is attempting to resolve the given endpoint reference on behalf of a component.
      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 Component).
      Returns:
        the service endpoint for the endpoint reference; `null` if the endpoint reference cannot be resolved.