Spring Integration

org.springframework.integration.gemfire.inbound
Class CacheListeningMessageProducer

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.endpoint.AbstractEndpoint
          extended by org.springframework.integration.endpoint.MessageProducerSupport
              extended by org.springframework.integration.gemfire.inbound.CacheListeningMessageProducer
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, NamedComponent, MessageProducer, TrackableComponent

public class CacheListeningMessageProducer
extends MessageProducerSupport

An inbound endpoint that listens to a GemFire region for events and then publishes Messages to a channel. The default supported event types are CREATED and UPDATED. See the EventType enum for all options. A SpEL expression may be provided to generate a Message payload by evaluating that expression against the EntryEvent instance as the root object. If no payloadExpression is provided, the EntryEvent itself will be the payload.

Since:
2.1
Author:
Mark Fisher, David Turanski

Constructor Summary
CacheListeningMessageProducer(com.gemstone.gemfire.cache.Region<?,?> region)
           
 
Method Summary
protected  void doStart()
          Takes no action by default.
protected  void doStop()
          Takes no action by default.
protected  java.lang.Object evaluationResult(java.lang.Object payload)
           
protected  void onInit()
          Subclasses may implement this for initialization logic.
 void setPayloadExpression(java.lang.String payloadExpression)
           
 void setSupportedEventTypes(EventType... eventTypes)
           
 
Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
sendMessage, setErrorChannel, setOutputChannel, setSendTimeout, setShouldTrack
 
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, 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.context.NamedComponent
getComponentName, getComponentType
 

Constructor Detail

CacheListeningMessageProducer

public CacheListeningMessageProducer(com.gemstone.gemfire.cache.Region<?,?> region)
Method Detail

setSupportedEventTypes

public void setSupportedEventTypes(EventType... eventTypes)

doStart

protected void doStart()
Description copied from class: MessageProducerSupport
Takes no action by default. Subclasses may override this if they need lifecycle-managed behavior.

Overrides:
doStart in class MessageProducerSupport

doStop

protected void doStop()
Description copied from class: MessageProducerSupport
Takes no action by default. Subclasses may override this if they need lifecycle-managed behavior.

Overrides:
doStop in class MessageProducerSupport

onInit

protected void onInit()
Description copied from class: IntegrationObjectSupport
Subclasses may implement this for initialization logic.

Overrides:
onInit in class MessageProducerSupport

setPayloadExpression

public void setPayloadExpression(java.lang.String payloadExpression)

evaluationResult

protected java.lang.Object evaluationResult(java.lang.Object payload)

Spring Integration