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:
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.SimpleEndpoint
logger
 
Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
definition, description, endpoint, interfaceName, service, serviceUnit
 
Constructor Summary
ContentEnricher()
           
 
Method Summary
 javax.xml.namespace.QName getEnricherElementName()
          returns the QName of the resulting root node
 javax.xml.namespace.QName getRequestElementName()
          Returns the QName of the element which contains the 'IN Message' within the response message
 javax.xml.namespace.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(javax.xml.namespace.QName enricherElementName)
          Sets the QName of the resulting root node
 void setEnricherTarget(ExchangeTarget enricherTarget)
          The target that will receive a copy of the input message and return an addtitional content.
 void setRequestElementName(javax.xml.namespace.QName requestElementName)
          Sets the QName of the element which contains the 'IN Message' within the response message
 void setResultElementName(javax.xml.namespace.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)
          The target where the enriched exchanges are sent.
 
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 javax.xml.namespace.QName getEnricherElementName()
returns the QName of the resulting root node

Returns:
QName of the resulting root node

setEnricherElementName

public void setEnricherElementName(javax.xml.namespace.QName enricherElementName)
Sets the QName of the resulting root node

Parameters:
enricherElementName - QName of the resulting root node

getRequestElementName

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

Returns:
QName

setRequestElementName

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

Parameters:
requestElementName - QName

getResultElementName

public javax.xml.namespace.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(javax.xml.namespace.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 java.lang.Exception
Specified by:
processAsync in class EIPEndpoint
Throws:
java.lang.Exception

processSync

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

process

public void process(javax.jbi.messaging.MessageExchange exchange)
             throws java.lang.Exception
Specified by:
process in interface Endpoint
Overrides:
process in class EIPEndpoint
Throws:
java.lang.Exception

setTarget

public void setTarget(ExchangeTarget target)
The target where the enriched exchanges are sent.

Parameters:
target -

setEnricherTarget

public void setEnricherTarget(ExchangeTarget enricherTarget)
The target that will receive a copy of the input message and return an addtitional content.

Parameters:
enricherTarget -


Copyright © 2005-2011 FuseSource. All Rights Reserved.