Class ContinuousQueryMessageProducer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.endpoint.ExpressionMessageProducerSupport
org.springframework.integration.gemfire.inbound.ContinuousQueryMessageProducer
- All Implemented Interfaces:
Aware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,SmartInitializingSingleton,ApplicationContextAware,Lifecycle,Phased,SmartLifecycle,ContinuousQueryListener,ExpressionCapable,MessageProducer,IntegrationPattern,NamedComponent,ManageableLifecycle,ManageableSmartLifecycle,TrackableComponent
public class ContinuousQueryMessageProducer extends ExpressionMessageProducerSupport implements ContinuousQueryListener
Responds to a Gemfire continuous query (set using the #query field) that is
constantly evaluated against a cache
Region. This is much faster than
re-querying the cache manually.- Since:
- 2.1
- Author:
- Josh Long, David Turanski, Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.endpoint.AbstractEndpoint
lifecycleCondition, lifecycleLockFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER -
Constructor Summary
Constructors Constructor Description ContinuousQueryMessageProducer(ContinuousQueryListenerContainer queryListenerContainer, String query) -
Method Summary
Modifier and Type Method Description StringgetComponentType()Subclasses may implement this method to provide component type information.voidonEvent(org.apache.geode.cache.query.CqEvent event)protected voidonInit()Subclasses may implement this for initialization logic.voidsetDurable(boolean durable)voidsetQueryName(String queryName)voidsetSupportedEventTypes(CqEventType... eventTypes)Methods inherited from class org.springframework.integration.endpoint.ExpressionMessageProducerSupport
evaluatePayloadExpression, setIntegrationEvaluationContext, setPayloadExpression, setPayloadExpressionStringMethods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
afterSingletonsInstantiated, buildErrorMessage, doStart, doStop, getErrorChannel, getErrorMessageAttributes, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisherMethods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
destroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName
-
Constructor Details
-
ContinuousQueryMessageProducer
public ContinuousQueryMessageProducer(ContinuousQueryListenerContainer queryListenerContainer, String query)- Parameters:
queryListenerContainer- aContinuousQueryListenerContainerquery- the query string
-
-
Method Details
-
setQueryName
- Parameters:
queryName- optional query name
-
setDurable
public void setDurable(boolean durable)- Parameters:
durable- true if the query is a durable subscription
-
setSupportedEventTypes
-
getComponentType
Description copied from class:IntegrationObjectSupportSubclasses may implement this method to provide component type information.- Specified by:
getComponentTypein interfaceNamedComponent- Overrides:
getComponentTypein classIntegrationObjectSupport
-
onInit
protected void onInit()Description copied from class:IntegrationObjectSupportSubclasses may implement this for initialization logic.- Overrides:
onInitin classExpressionMessageProducerSupport
-
onEvent
public void onEvent(org.apache.geode.cache.query.CqEvent event)- Specified by:
onEventin interfaceContinuousQueryListener
-