org.apache.servicemix.components.util
Class ComponentAdaptor

java.lang.Object
  extended by org.apache.servicemix.components.util.ComponentAdaptor
All Implemented Interfaces:
javax.jbi.component.Component
Direct Known Subclasses:
ComponentAdaptorMEListener

public class ComponentAdaptor
extends Object
implements javax.jbi.component.Component

A simple adaptor which can be used to turn any instance of a ComponentLifeCycle into a fully fledged JBI Component

Version:
$Revision: 564374 $

Constructor Summary
ComponentAdaptor(javax.jbi.component.ComponentLifeCycle lifeCycle)
           
ComponentAdaptor(javax.jbi.component.ComponentLifeCycle lifeCycle, QName service, String endpoint)
           
 
Method Summary
protected  javax.jbi.component.ServiceUnitManager createServiceUnitManager()
           
 javax.jbi.component.ComponentContext getContext()
           
 javax.jbi.component.ComponentLifeCycle getLifeCycle()
           
 Document getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint ep)
           
 javax.jbi.component.ServiceUnitManager getServiceUnitManager()
           
 void init(javax.jbi.component.ComponentContext ctx)
          Called when the Component is initialized
protected  void initializeServiceUnitManager()
           
 boolean isExchangeWithConsumerOkay(javax.jbi.servicedesc.ServiceEndpoint ep, javax.jbi.messaging.MessageExchange exchange)
           
 boolean isExchangeWithProviderOkay(javax.jbi.servicedesc.ServiceEndpoint ep, javax.jbi.messaging.MessageExchange exchange)
           
 javax.jbi.servicedesc.ServiceEndpoint resolveEndpointReference(DocumentFragment epr)
           
 void setServiceManager(javax.jbi.component.ServiceUnitManager serviceManager)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComponentAdaptor

public ComponentAdaptor(javax.jbi.component.ComponentLifeCycle lifeCycle)

ComponentAdaptor

public ComponentAdaptor(javax.jbi.component.ComponentLifeCycle lifeCycle,
                        QName service,
                        String endpoint)
Method Detail

init

public void init(javax.jbi.component.ComponentContext ctx)
          throws javax.jbi.JBIException
Called when the Component is initialized

Parameters:
ctx -
Throws:
javax.jbi.JBIException

getLifeCycle

public javax.jbi.component.ComponentLifeCycle getLifeCycle()
Specified by:
getLifeCycle in interface javax.jbi.component.Component
Returns:
the lifecycel control implementation

getServiceUnitManager

public javax.jbi.component.ServiceUnitManager getServiceUnitManager()
Specified by:
getServiceUnitManager in interface javax.jbi.component.Component

setServiceManager

public void setServiceManager(javax.jbi.component.ServiceUnitManager serviceManager)

getContext

public javax.jbi.component.ComponentContext getContext()

toString

public String toString()
Overrides:
toString in class Object

initializeServiceUnitManager

protected void initializeServiceUnitManager()

createServiceUnitManager

protected javax.jbi.component.ServiceUnitManager createServiceUnitManager()

getServiceDescription

public Document getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint ep)
Specified by:
getServiceDescription in interface javax.jbi.component.Component

isExchangeWithConsumerOkay

public boolean isExchangeWithConsumerOkay(javax.jbi.servicedesc.ServiceEndpoint ep,
                                          javax.jbi.messaging.MessageExchange exchange)
Specified by:
isExchangeWithConsumerOkay in interface javax.jbi.component.Component

isExchangeWithProviderOkay

public boolean isExchangeWithProviderOkay(javax.jbi.servicedesc.ServiceEndpoint ep,
                                          javax.jbi.messaging.MessageExchange exchange)
Specified by:
isExchangeWithProviderOkay in interface javax.jbi.component.Component

resolveEndpointReference

public javax.jbi.servicedesc.ServiceEndpoint resolveEndpointReference(DocumentFragment epr)
Specified by:
resolveEndpointReference in interface javax.jbi.component.Component


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.