Package org.apache.camel.component.sql
Class SqlEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.support.ScheduledPollEndpoint
org.apache.camel.support.DefaultPollingEndpoint
org.apache.camel.component.sql.DefaultSqlEndpoint
org.apache.camel.component.sql.SqlEndpoint
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.ComponentAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasCamelContext
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="1.4.0",
scheme="sql",
title="SQL",
syntax="sql:query",
category=DATABASE,
headersClass=SqlConstants.class)
public class SqlEndpoint
extends DefaultSqlEndpoint
Perform SQL queries using Spring JDBC.
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.Consumer
createConsumer
(org.apache.camel.Processor processor) protected String
org.apache.camel.Producer
getQuery()
void
Sets the SQL query to perform.Methods inherited from class org.apache.camel.component.sql.DefaultSqlEndpoint
doInit, getDataSource, getExpectedUpdateCount, getJdbcTemplate, getMaxMessagesPerPoll, getOnConsume, getOnConsumeBatchComplete, getOnConsumeFailed, getOutputClass, getOutputHeader, getOutputType, getParametersCount, getPlaceholder, getPrepareStatementStrategy, getProcessingStrategy, getRowMapperFactory, getSeparator, getTemplateOptions, isAllowNamedParameters, isAlwaysPopulateStatement, isBatch, isBreakBatchOnConsumeFail, isNoop, isRouteEmptyResultSet, isTransacted, isUseIterator, isUseMessageBodyForSql, isUsePlaceholder, queryForList, queryForObject, queryForStreamList, setAllowNamedParameters, setAlwaysPopulateStatement, setBatch, setBreakBatchOnConsumeFail, setDataSource, setExpectedUpdateCount, setJdbcTemplate, setMaxMessagesPerPoll, setNoop, setOnConsume, setOnConsumeBatchComplete, setOnConsumeFailed, setOutputClass, setOutputHeader, setOutputType, setParametersCount, setPlaceholder, setPrepareStatementStrategy, setProcessingStrategy, setRouteEmptyResultSet, setRowMapperFactory, setSeparator, setTemplateOptions, setTransacted, setUseIterator, setUseMessageBodyForSql, setUsePlaceholder
Methods inherited from class org.apache.camel.support.ScheduledPollEndpoint
configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureExchange, configurePollingConsumer, createAsyncProducer, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.ComponentAware
getComponent
Methods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducer
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
SqlEndpoint
public SqlEndpoint() -
SqlEndpoint
-
-
Method Details
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Specified by:
createConsumer
in interfaceorg.apache.camel.Endpoint
- Overrides:
createConsumer
in classorg.apache.camel.support.DefaultPollingEndpoint
- Throws:
Exception
-
createProducer
- Throws:
Exception
-
createEndpointUri
- Overrides:
createEndpointUri
in classorg.apache.camel.support.DefaultEndpoint
-
getQuery
-
setQuery
Sets the SQL query to perform. You can externalize the query by using file: or classpath: as prefix and specify the location of the file.
-