org.apache.servicemix.common
Class BaseComponent
java.lang.Object
org.apache.servicemix.common.BaseComponent
- All Implemented Interfaces:
- Component, ServiceMixComponent
public abstract class BaseComponent
- extends Object
- implements ServiceMixComponent
Base class for a component.
- Since:
- 3.0
- Version:
- $Revision: 33980 $
- Author:
- Guillaume Nodet
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final transient Log logger
lifeCycle
protected BaseLifeCycle lifeCycle
registry
protected Registry registry
serviceUnitManager
protected BaseServiceUnitManager serviceUnitManager
BaseComponent
public BaseComponent()
getLifeCycle
public ComponentLifeCycle getLifeCycle()
- Specified by:
getLifeCycle in interface Component
getServiceUnitManager
public ServiceUnitManager getServiceUnitManager()
- Specified by:
getServiceUnitManager in interface Component
getServiceDescription
public Document getServiceDescription(ServiceEndpoint endpoint)
- Specified by:
getServiceDescription in interface Component
isExchangeWithConsumerOkay
public boolean isExchangeWithConsumerOkay(ServiceEndpoint endpoint,
MessageExchange exchange)
- Specified by:
isExchangeWithConsumerOkay in interface Component
isExchangeWithProviderOkay
public boolean isExchangeWithProviderOkay(ServiceEndpoint endpoint,
MessageExchange exchange)
- Specified by:
isExchangeWithProviderOkay in interface Component
resolveEndpointReference
public ServiceEndpoint resolveEndpointReference(DocumentFragment epr)
- Specified by:
resolveEndpointReference in interface Component
createLifeCycle
protected BaseLifeCycle createLifeCycle()
- Create the life cycle object.
Derived classes should override this method to be able to
use a custom life cycle implementation.
- Returns:
- a life cycle object
createServiceUnitManager
protected BaseServiceUnitManager createServiceUnitManager()
- Create the service unit manager.
Derived classes should override this method and return a
BaseServiceUnitManager so that the component is able to
handle service unit deployment.
- Returns:
- a service unit manager
createRegistry
protected Registry createRegistry()
getComponentContext
public ComponentContext getComponentContext()
- Specified by:
getComponentContext in interface ServiceMixComponent
- Returns:
- Returns the components context
getComponentName
public String getComponentName()
- Specified by:
getComponentName in interface ServiceMixComponent
- Returns:
- Returns the name of the component
getLogger
public Log getLogger()
- Specified by:
getLogger in interface ServiceMixComponent
- Returns:
- Returns the logger.
getRegistry
public Registry getRegistry()
- Specified by:
getRegistry in interface ServiceMixComponent
- Returns:
- Returns the registry.
getExecutor
public Executor getExecutor()
- Shortcut to retrieve this component's executor.
- Specified by:
getExecutor in interface ServiceMixComponent
- Returns:
- the executor for this component
sendConsumerExchange
public void sendConsumerExchange(MessageExchange exchange,
Endpoint endpoint)
throws MessagingException
- Description copied from interface:
ServiceMixComponent
- Sends a consumer exchange from the given endpoint.
- Specified by:
sendConsumerExchange in interface ServiceMixComponent
- Parameters:
exchange - the exchange to sendendpoint - the endpoint sending the exchange
- Throws:
MessagingException
prepareConsumerExchange
public void prepareConsumerExchange(MessageExchange exchange,
Endpoint endpoint)
throws MessagingException
- Description copied from interface:
ServiceMixComponent
- Prepare a consumer exchange from the given endpoint.
The caller need to send / sendSync the exchange.
- Specified by:
prepareConsumerExchange in interface ServiceMixComponent
- Parameters:
exchange - the exchange to sendendpoint - the endpoint sending the exchange
- Throws:
MessagingException
getEPRElementName
public QName getEPRElementName()
- Specified by:
getEPRElementName in interface ServiceMixComponent
- Returns:
- the QName of the element used in EPR
Copyright © 2005-2008. All Rights Reserved.