org.apache.camel.bam.processor
Class BamProcessorSupport<T>
java.lang.Object
org.apache.camel.bam.processor.BamProcessorSupport<T>
- All Implemented Interfaces:
- org.apache.camel.Processor
- Direct Known Subclasses:
- JpaBamProcessorSupport
public abstract class BamProcessorSupport<T>
- extends Object
- implements org.apache.camel.Processor
A base Processor
for working on BAM which a derived
class would do the actual persistence such as the JpaBamProcessor
- Version:
Constructor Summary |
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BamProcessorSupport
protected BamProcessorSupport(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.apache.camel.Expression correlationKeyExpression)
BamProcessorSupport
protected BamProcessorSupport(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
org.apache.camel.Expression correlationKeyExpression,
Class<T> entitytype)
process
public void process(org.apache.camel.Exchange exchange)
- Specified by:
process
in interface org.apache.camel.Processor
getCorrelationKeyExpression
public org.apache.camel.Expression getCorrelationKeyExpression()
getEntityType
public Class<T> getEntityType()
processEntity
protected abstract void processEntity(org.apache.camel.Exchange exchange,
T entity)
throws Exception
- Throws:
Exception
loadEntity
protected abstract T loadEntity(org.apache.camel.Exchange exchange,
Object key)
throws Exception
- Throws:
Exception
getKeyType
protected abstract Class<?> getKeyType()
getCorrelationKey
protected Object getCorrelationKey(org.apache.camel.Exchange exchange)
throws NoCorrelationKeyException
- Throws:
NoCorrelationKeyException
onError
protected void onError(org.springframework.transaction.TransactionStatus status,
Exception e)
throws org.apache.camel.RuntimeCamelException
- Throws:
org.apache.camel.RuntimeCamelException
Apache Camel