org.apache.servicemix.common
Interface ServiceMixComponent

All Superinterfaces:
javax.jbi.component.Component
All Known Implementing Classes:
BaseComponent, DefaultComponent

public interface ServiceMixComponent
extends javax.jbi.component.Component

Represents an extended JBI Component implementation which exposes some extra features.

Version:
$Revision$

Method Summary
 javax.jbi.component.ComponentContext getComponentContext()
           
 java.lang.String getComponentName()
           
 Container getContainer()
           
 javax.xml.namespace.QName getEPRElementName()
           
 org.apache.servicemix.executors.Executor getExecutor(javax.jbi.messaging.MessageExchange.Role role)
           
 org.slf4j.Logger getLogger()
           
 Registry getRegistry()
           
 java.lang.Object getSmx3Container()
           
 void handleExchange(Endpoint endpoint, javax.jbi.messaging.MessageExchange exchange, boolean add)
          Make the component aware of this exchange.
 void prepareExchange(javax.jbi.messaging.MessageExchange exchange, Endpoint endpoint)
          Prepare an exchange sent from the given endpoint.
 void prepareShutdown(Endpoint endpoint)
          Prepare shutting the given endpoint down by waiting for all know exchanges for this endpoint to be fully processed.
 
Methods inherited from interface javax.jbi.component.Component
getLifeCycle, getServiceDescription, getServiceUnitManager, isExchangeWithConsumerOkay, isExchangeWithProviderOkay, resolveEndpointReference
 

Method Detail

getLogger

org.slf4j.Logger getLogger()
Returns:
Returns the logger.

getRegistry

Registry getRegistry()
Returns:
Returns the registry.

getExecutor

org.apache.servicemix.executors.Executor getExecutor(javax.jbi.messaging.MessageExchange.Role role)
Parameters:
role - the role to use
Returns:
Returns the executor for this component

getComponentContext

javax.jbi.component.ComponentContext getComponentContext()
Returns:
Returns the components context

getContainer

Container getContainer()
Returns:
the JBI container

getSmx3Container

java.lang.Object getSmx3Container()
Returns:
the servicemix 3 container if deployed into it

getComponentName

java.lang.String getComponentName()
Returns:
Returns the name of the component

prepareExchange

void prepareExchange(javax.jbi.messaging.MessageExchange exchange,
                     Endpoint endpoint)
                     throws javax.jbi.messaging.MessagingException
Prepare an exchange sent from the given endpoint. The caller need to send / sendSync the exchange.

Parameters:
exchange - the exchange to send
endpoint - the endpoint sending the exchange
Throws:
javax.jbi.messaging.MessagingException

prepareShutdown

void prepareShutdown(Endpoint endpoint)
                     throws java.lang.InterruptedException
Prepare shutting the given endpoint down by waiting for all know exchanges for this endpoint to be fully processed.

Parameters:
endpoint -
Throws:
java.lang.InterruptedException

handleExchange

void handleExchange(Endpoint endpoint,
                    javax.jbi.messaging.MessageExchange exchange,
                    boolean add)
Make the component aware of this exchange. This method needs to be called for each exchange sent or received.

Parameters:
endpoint -
exchange -
add -

getEPRElementName

javax.xml.namespace.QName getEPRElementName()
Returns:
the QName of the element used in EPR


Copyright © 2005-2012 FuseSource. All Rights Reserved.