org.apache.servicemix.eip.support
Class AbstractSplitter

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.support.AbstractSplitter
All Implemented Interfaces:
Endpoint
Direct Known Subclasses:
XPathSplitter

public abstract class AbstractSplitter
extends EIPEndpoint

The AbstractSplitter is an abstract base class for Splitters. This component implements the Splitter pattern.

Version:
$Revision: 376451 $
Author:
gnodet

Field Summary
static java.lang.String SPLITTER_CORRID
           
static java.lang.String SPLITTER_COUNT
           
static java.lang.String SPLITTER_INDEX
           
 
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, service, serviceUnit
 
Constructor Summary
AbstractSplitter()
           
 
Method Summary
protected  javax.jbi.messaging.MessageExchange createPart(java.net.URI pattern, javax.jbi.messaging.NormalizedMessage srcMessage, javax.xml.transform.Source content)
           
protected  javax.jbi.messaging.MessageExchange[] createParts(javax.jbi.messaging.MessageExchange exchange)
           
 ExchangeTarget getTarget()
           
 boolean isForwardAttachments()
           
 boolean isForwardProperties()
           
 boolean isReportErrors()
           
 boolean isSynchronous()
           
protected  void processAsync(javax.jbi.messaging.MessageExchange exchange)
           
protected  void processSync(javax.jbi.messaging.MessageExchange exchange)
           
 void setForwardAttachments(boolean forwardAttachments)
          Indicates if incoming attachments should be forwarded with the new exchanges.
 void setForwardProperties(boolean forwardProperties)
          Indicates if properties on the incoming message should be forwarded.
 void setReportErrors(boolean reportErrors)
          Indicates if faults and errors from splitted parts should be sent back to the consumer.
 void setSynchronous(boolean synchronous)
          Specifies wether exchanges for all parts are sent synchronously or not.
 void setTarget(ExchangeTarget target)
          The address of the target endpoint.
protected abstract  javax.xml.transform.Source[] split(javax.xml.transform.Source main)
           
 void start()
           
 void validate()
           
 
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, process, setLockManager, setStore, setStoreFactory, setTimerManager, setWsdlExchangeTarget, setWsdlResource, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SPLITTER_COUNT

public static final java.lang.String SPLITTER_COUNT
See Also:
Constant Field Values

SPLITTER_INDEX

public static final java.lang.String SPLITTER_INDEX
See Also:
Constant Field Values

SPLITTER_CORRID

public static final java.lang.String SPLITTER_CORRID
See Also:
Constant Field Values
Constructor Detail

AbstractSplitter

public AbstractSplitter()
Method Detail

isSynchronous

public boolean isSynchronous()
Returns:
the synchronous

setSynchronous

public void setSynchronous(boolean synchronous)
Specifies wether exchanges for all parts are sent synchronously or not.

Parameters:
synchronous - the synchronous to set

isReportErrors

public boolean isReportErrors()
Returns:
Returns the reportErrors.

setReportErrors

public void setReportErrors(boolean reportErrors)
Indicates if faults and errors from splitted parts should be sent back to the consumer. In such a case, only the first fault or error received will be reported. Note that if the consumer is synchronous, it will be blocked until all parts have been successfully acked, or a fault or error is reported, and the exchange will be kept in the store for recovery.

Parameters:
reportErrors - The reportErrors to set.

getTarget

public ExchangeTarget getTarget()
Returns:
Returns the target.

setTarget

public void setTarget(ExchangeTarget target)
The address of the target endpoint.

Parameters:
target - The target to set.

isForwardAttachments

public boolean isForwardAttachments()
Returns:
Returns the forwardAttachments.

setForwardAttachments

public void setForwardAttachments(boolean forwardAttachments)
Indicates if incoming attachments should be forwarded with the new exchanges.

Parameters:
forwardAttachments - The forwardAttachments to set.

isForwardProperties

public boolean isForwardProperties()
Returns:
Returns the forwardProperties.

setForwardProperties

public void setForwardProperties(boolean forwardProperties)
Indicates if properties on the incoming message should be forwarded.

Parameters:
forwardProperties - The forwardProperties to set.

validate

public void validate()
              throws javax.jbi.management.DeploymentException
Specified by:
validate in interface Endpoint
Overrides:
validate in class AbstractEndpoint
Throws:
javax.jbi.management.DeploymentException

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface Endpoint
Overrides:
start 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

processAsync

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

createParts

protected javax.jbi.messaging.MessageExchange[] createParts(javax.jbi.messaging.MessageExchange exchange)
                                                     throws java.lang.Exception
Throws:
java.lang.Exception

createPart

protected javax.jbi.messaging.MessageExchange createPart(java.net.URI pattern,
                                                         javax.jbi.messaging.NormalizedMessage srcMessage,
                                                         javax.xml.transform.Source content)
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

split

protected abstract javax.xml.transform.Source[] split(javax.xml.transform.Source main)
                                               throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2005-2011 FuseSource. All Rights Reserved.