public abstract class AbstractDbMessageProcessor extends AbstractInterceptingMessageProcessor implements Initialisable, InterceptingMessageProcessor, org.mule.common.metadata.OperationMetaDataEnabled
Modifier and Type | Field and Description |
---|---|
protected DbConfigResolver |
dbConfigResolver |
logger, muleContext, next, notificationHandler
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
AbstractDbMessageProcessor(DbConfigResolver dbConfigResolver,
TransactionalAction transactionalAction) |
Modifier and Type | Method and Description |
---|---|
protected abstract Object |
executeQuery(DbConnection connection,
MuleEvent muleEvent) |
org.mule.common.Result<org.mule.common.metadata.MetaData> |
getInputMetaData() |
org.mule.common.Result<org.mule.common.metadata.MetaData> |
getOutputMetaData(org.mule.common.metadata.MetaData metaData) |
QueryMetadataProvider |
getQueryMetadataProvider() |
String |
getSource() |
String |
getTarget() |
protected abstract List<QueryType> |
getValidQueryTypes() |
void |
initialise()
Method used to perform any initialisation work.
|
protected boolean |
mustCloseConnection() |
MuleEvent |
process(MuleEvent muleEvent)
Invokes the MessageProcessor.
|
protected MuleEvent |
resolveSource(MuleEvent muleEvent) |
void |
setQueryMetadataProvider(QueryMetadataProvider queryMetadataProvider) |
void |
setSource(String source) |
void |
setTarget(String target) |
protected void |
validateQueryType(QueryTemplate queryTemplate) |
addMessageProcessorPathElements, getAnnotation, getAnnotations, getListener, getMuleContext, isEventValid, processNext, setAnnotations, setListener, setMuleContext, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setListener
protected final DbConfigResolver dbConfigResolver
public AbstractDbMessageProcessor(DbConfigResolver dbConfigResolver, TransactionalAction transactionalAction)
public MuleEvent process(MuleEvent muleEvent) throws MuleException
MessageProcessor
process
in interface MessageProcessor
muleEvent
- MuleEvent to be processedMuleException
protected boolean mustCloseConnection()
protected abstract Object executeQuery(DbConnection connection, MuleEvent muleEvent) throws SQLException
SQLException
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic void setQueryMetadataProvider(QueryMetadataProvider queryMetadataProvider)
public QueryMetadataProvider getQueryMetadataProvider()
public org.mule.common.Result<org.mule.common.metadata.MetaData> getOutputMetaData(org.mule.common.metadata.MetaData metaData)
getOutputMetaData
in interface org.mule.common.metadata.MetaDataDescriptor
public org.mule.common.Result<org.mule.common.metadata.MetaData> getInputMetaData()
getInputMetaData
in interface org.mule.common.metadata.MetaDataDescriptor
public String getSource()
public void setSource(String source)
public String getTarget()
public void setTarget(String target)
protected void validateQueryType(QueryTemplate queryTemplate)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.