public abstract class BamProcessorSupport<T> extends Object implements org.apache.camel.Processor
Processor
for working on BAM which a derived
class would do the actual persistence such as the JpaBamProcessor
Modifier | Constructor and Description |
---|---|
protected |
BamProcessorSupport(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.apache.camel.Expression correlationKeyExpression) |
protected |
BamProcessorSupport(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.apache.camel.Expression correlationKeyExpression,
Class<T> entitytype) |
Modifier and Type | Method and Description |
---|---|
protected Object |
getCorrelationKey(org.apache.camel.Exchange exchange) |
org.apache.camel.Expression |
getCorrelationKeyExpression() |
Class<T> |
getEntityType() |
protected abstract Class<?> |
getKeyType() |
protected abstract T |
loadEntity(org.apache.camel.Exchange exchange,
Object key) |
protected void |
onError(org.springframework.transaction.TransactionStatus status,
Exception e) |
void |
process(org.apache.camel.Exchange exchange) |
protected abstract void |
processEntity(org.apache.camel.Exchange exchange,
T entity) |
protected BamProcessorSupport(org.springframework.transaction.support.TransactionTemplate transactionTemplate, org.apache.camel.Expression correlationKeyExpression)
public void process(org.apache.camel.Exchange exchange)
process
in interface org.apache.camel.Processor
public org.apache.camel.Expression getCorrelationKeyExpression()
protected abstract void processEntity(org.apache.camel.Exchange exchange, T entity) throws Exception
Exception
protected abstract T loadEntity(org.apache.camel.Exchange exchange, Object key) throws Exception
Exception
protected abstract Class<?> getKeyType()
protected Object getCorrelationKey(org.apache.camel.Exchange exchange) throws NoCorrelationKeyException
NoCorrelationKeyException
protected void onError(org.springframework.transaction.TransactionStatus status, Exception e) throws org.apache.camel.RuntimeCamelException
org.apache.camel.RuntimeCamelException
Apache Camel