org.apache.servicemix.eip.patterns
Class ContentEnricher

java.lang.Object
  extended by org.apache.servicemix.common.endpoints.AbstractEndpoint
      extended by org.apache.servicemix.common.endpoints.SimpleEndpoint
          extended by org.apache.servicemix.common.endpoints.ProviderEndpoint
              extended by org.apache.servicemix.eip.EIPEndpoint
                  extended by org.apache.servicemix.eip.patterns.ContentEnricher
All Implemented Interfaces:
org.apache.servicemix.common.Endpoint

public class ContentEnricher
extends EIPEndpoint

Implementation of the 'Content-Enricher' Pattern.


Field Summary
 
Fields inherited from class org.apache.servicemix.eip.EIPEndpoint
lockManager, store, storeFactory, timerManager, wsdlExchangeTarget, wsdlResource
 
Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
definition, description, endpoint, interfaceName, logger, service, serviceUnit
 
Constructor Summary
ContentEnricher()
           
 
Method Summary
 QName getEnricherElementName()
          returns the QName of the resulting root node
 QName getRequestElementName()
          Returns the QName of the element which contains the 'IN Message' within the response message
 QName getResultElementName()
          Returns the QName of the element which contains the message which was produced by the enricherTarget within the response message
 boolean isCopyAttachments()
           
 boolean isCopyProperties()
           
 void process(javax.jbi.messaging.MessageExchange exchange)
           
protected  void processAsync(javax.jbi.messaging.MessageExchange exchange)
           
protected  void processSync(javax.jbi.messaging.MessageExchange exchange)
           
 void setCopyAttachments(boolean copyAttachments)
          If this is set to true, message attachments from the incoming exchange and the enricher exchange will be copied to the outgoing message exchange.
 void setCopyProperties(boolean copyProperties)
          If this is set to true, message properties from the incoming exchange and the enricher exchange will be copied to the outgoing message exchange.
 void setEnricherElementName(QName enricherElementName)
          Sets the QName of the resulting root node
 void setEnricherTarget(ExchangeTarget enricherTarget)
           
 void setRequestElementName(QName requestElementName)
          Sets the QName of the element which contains the 'IN Message' within the response message
 void setResultElementName(QName resultElementName)
          Sets the QName of the element which contains the message which was produced by the enricherTarget within the response message
 void setTarget(ExchangeTarget target)
           
 
Methods inherited from class org.apache.servicemix.eip.EIPEndpoint
chooseFirstEndpointWithDescriptor, copyAttachments, copyProperties, getDefinition, getDefinitionFromDescription, getDefinitionFromWsdlExchangeTarget, getDefinitionFromWsdlResource, getDescription, getDescriptionForExchangeTarget, getEndpointsForExchangeTarget, getLockManager, getStore, getStoreFactory, getTimerManager, getWsdlExchangeTarget, getWsdlResource, setLockManager, setStore, setStoreFactory, setTimerManager, setWsdlExchangeTarget, setWsdlResource, start, stop
 
Methods inherited from class org.apache.servicemix.common.endpoints.ProviderEndpoint
activate, deactivate, getRole, processInOnly, processInOut
 
Methods inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint
done, fail, getChannel, getContext, getExchangeFactory, send, sendSync
 
Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentEnricher

public ContentEnricher()
Method Detail

getEnricherElementName

public QName getEnricherElementName()
returns the QName of the resulting root node

Returns:
QName of the resulting root node

setEnricherElementName

public void setEnricherElementName(QName enricherElementName)
Sets the QName of the resulting root node

Parameters:
enricherElementName - QName of the resulting root node

getRequestElementName

public QName getRequestElementName()
Returns the QName of the element which contains the 'IN Message' within the response message

Returns:
QName

setRequestElementName

public void setRequestElementName(QName requestElementName)
Sets the QName of the element which contains the 'IN Message' within the response message

Parameters:
requestElementName - QName

getResultElementName

public QName getResultElementName()
Returns the QName of the element which contains the message which was produced by the enricherTarget within the response message

Returns:
QName

setResultElementName

public void setResultElementName(QName resultElementName)
Sets the QName of the element which contains the message which was produced by the enricherTarget within the response message

Parameters:
resultElementName - QName

isCopyProperties

public boolean isCopyProperties()

setCopyProperties

public void setCopyProperties(boolean copyProperties)
If this is set to true, message properties from the incoming exchange and the enricher exchange will be copied to the outgoing message exchange. The default value is false (do not copy message properties).

Parameters:
copyProperties -

isCopyAttachments

public boolean isCopyAttachments()

setCopyAttachments

public void setCopyAttachments(boolean copyAttachments)
If this is set to true, message attachments from the incoming exchange and the enricher exchange will be copied to the outgoing message exchange. The default value is false (do not copy message atachments).

Parameters:
copyAttachments -

processAsync

protected void processAsync(javax.jbi.messaging.MessageExchange exchange)
                     throws Exception
Specified by:
processAsync in class EIPEndpoint
Throws:
Exception

processSync

protected void processSync(javax.jbi.messaging.MessageExchange exchange)
                    throws Exception
Specified by:
processSync in class EIPEndpoint
Throws:
Exception

process

public void process(javax.jbi.messaging.MessageExchange exchange)
             throws Exception
Specified by:
process in interface org.apache.servicemix.common.Endpoint
Overrides:
process in class EIPEndpoint
Throws:
Exception

setTarget

public void setTarget(ExchangeTarget target)

setEnricherTarget

public void setEnricherTarget(ExchangeTarget enricherTarget)


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