Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.jbi.component
Interface Component

public interface Component

This interface, implemented by component implementations, allows the JBI implementation to query the component for various types of information. This includes:

- The component's life cycle control interface.
- The component's service unit manager, for handling deployments.
- A method for querying service metadata describing services provided by this component.
- "Policy" methods that are called by the JBI implementation to query if proposed matches of this component to a provider (or consumer) are acceptable, according to this component's policies.
- Endpoint reference (EPR) resolution. Some components will provide the ability to resolve EPRs (typically binding components). This ability to resolve EPRs is used by JBI to facilitate resolution of EPRs received by service consumers.

The name of the class that implements this interface for a component is specified in the installation descriptor for that component.

Author:
  JSR208 Expert Group

Method Summary
`ComponentLifeCycle` | `getLifeCycle()` Get the life cycle control interface for this component.
`org.w3c.dom.Document` | `getServiceDescription(ServiceEndpoint endpoint)` Retrieves a DOM representation containing metadata which describes the service provided by this component, through the given endpoint.
`ServiceUnitManager` | `getServiceUnitManager()` Get the Service Unit manager for this component.
`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.
`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.
`ServiceEndpoint` | `resolveEndpointReference(org.w3c.dom.DocumentFragment epr)` Resolve the given endpoint reference.

Method Detail

### getLifeCycle

    public ComponentLifeCycle getLifeCycle()

  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.

  Returns:
    the life cycle control interface for this component; must be non-null.

### getServiceUnitManager

    public ServiceUnitManager getServiceUnitManager()

  Get the Service Unit manager for this component. If this component does not support deployments, it must return `null`.

  Returns:
    the `ServiceUnitManager` for this component, or `null` if there is none.

### getServiceDescription

    public org.w3c.dom.Document getServiceDescription(ServiceEndpoint endpoint)

  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.
  Returns:
    the description for the specified service endpoint.

### isExchangeWithConsumerOkay

    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.

  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(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. 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 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 ServiceEndpoint resolveEndpointReference(org.w3c.dom.DocumentFragment epr)

  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(QName, String)`), 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 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Built 06/07/2005 11:16 AM on acer (SunOS 5.9)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004-2005 Sun Microsystems Inc., All Rights Reserved.