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:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.SmartInitializingSingleton, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, org.springframework.data.gemfire.listener.ContinuousQueryListener, org.springframework.integration.context.ExpressionCapable, org.springframework.integration.core.MessageProducer, org.springframework.integration.IntegrationPattern, org.springframework.integration.support.context.NamedComponent, org.springframework.integration.support.management.IntegrationInboundManagement, org.springframework.integration.support.management.IntegrationManagement, org.springframework.integration.support.management.ManageableLifecycle, org.springframework.integration.support.management.ManageableSmartLifecycle, org.springframework.integration.support.management.TrackableComponent

public class ContinuousQueryMessageProducer extends org.springframework.integration.endpoint.ExpressionMessageProducerSupport implements org.springframework.data.gemfire.listener.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
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement

    org.springframework.integration.support.management.IntegrationManagement.ManagementOverrides
  • Field Summary

    Fields inherited from class org.springframework.integration.endpoint.AbstractEndpoint

    lifecycleCondition, lifecycleLock

    Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport

    EXPRESSION_PARSER

    Fields inherited from interface org.springframework.integration.support.management.IntegrationManagement

    METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME

    Fields inherited from interface org.springframework.context.SmartLifecycle

    DEFAULT_PHASE
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContinuousQueryMessageProducer(org.springframework.data.gemfire.listener.ContinuousQueryListenerContainer queryListenerContainer, String query)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    onEvent(org.apache.geode.cache.query.CqEvent event)
     
    protected void
     
    void
    setDurable(boolean durable)
     
    void
    setQueryName(String queryName)
     
    void
     

    Methods inherited from class org.springframework.integration.endpoint.ExpressionMessageProducerSupport

    evaluatePayloadExpression, setIntegrationEvaluationContext, setPayloadExpression, setPayloadExpressionString

    Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport

    afterSingletonsInstantiated, buildErrorMessage, doStart, doStop, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, isObserved, registerObservationRegistry, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setObservationConvention, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisher

    Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint

    destroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stop

    Methods 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, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.springframework.integration.support.management.IntegrationManagement

    destroy, getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedType

    Methods inherited from interface org.springframework.integration.support.context.NamedComponent

    getBeanName, getComponentName
  • Constructor Details

    • ContinuousQueryMessageProducer

      public ContinuousQueryMessageProducer(org.springframework.data.gemfire.listener.ContinuousQueryListenerContainer queryListenerContainer, String query)
      Parameters:
      queryListenerContainer - a ContinuousQueryListenerContainer
      query - the query string
  • Method Details

    • setQueryName

      public void setQueryName(String queryName)
      Parameters:
      queryName - optional query name
    • setDurable

      public void setDurable(boolean durable)
      Parameters:
      durable - true if the query is a durable subscription
    • setSupportedEventTypes

      public void setSupportedEventTypes(CqEventType... eventTypes)
    • getComponentType

      public String getComponentType()
      Specified by:
      getComponentType in interface org.springframework.integration.support.context.NamedComponent
      Overrides:
      getComponentType in class org.springframework.integration.context.IntegrationObjectSupport
    • onInit

      protected void onInit()
      Overrides:
      onInit in class org.springframework.integration.endpoint.ExpressionMessageProducerSupport
    • onEvent

      public void onEvent(org.apache.geode.cache.query.CqEvent event)
      Specified by:
      onEvent in interface org.springframework.data.gemfire.listener.ContinuousQueryListener