public abstract class AbstractDbMessageProcessor extends AbstractInterceptingMessageProcessor implements Initialisable, InterceptingMessageProcessor, org.mule.common.metadata.OperationMetaDataEnabled, DebugInfoProvider
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) |
List<FieldDebugInfo<?>> |
getDebugInfo(MuleEvent muleEvent)
Returns debug information about the fields of this object.
|
org.mule.common.Result<org.mule.common.metadata.MetaData> |
getInputMetaData() |
protected abstract List<FieldDebugInfo<?>> |
getMessageProcessorDebugInfo(DbConnection connection,
MuleEvent muleEvent) |
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 |
setStatementStreamingResultSetCloser(StatementStreamingResultSetCloser streamingResultSetCloser) |
void |
setTarget(String target) |
protected void |
validateQueryType(QueryTemplate queryTemplate) |
addMessageProcessorPathElements, getListener, getMuleContext, isEventValid, processNext, setListener, setMuleContext, toString
getAnnotation, getAnnotations, setAnnotations
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)
public void setStatementStreamingResultSetCloser(StatementStreamingResultSetCloser streamingResultSetCloser)
protected void validateQueryType(QueryTemplate queryTemplate)
public List<FieldDebugInfo<?>> getDebugInfo(MuleEvent muleEvent)
DebugInfoProvider
getDebugInfo
in interface DebugInfoProvider
muleEvent
- event used while debugging. Non nullList
protected abstract List<FieldDebugInfo<?>> getMessageProcessorDebugInfo(DbConnection connection, MuleEvent muleEvent)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.