Spring Integration Kafka Support

org.springframework.integration.kafka.outbound
Class KafkaProducerMessageHandler<K,V>

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.handler.AbstractMessageHandler
          extended by org.springframework.integration.kafka.outbound.KafkaProducerMessageHandler<K,V>
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.ApplicationContextAware, org.springframework.core.Ordered, org.springframework.integration.context.Orderable, org.springframework.integration.expression.IntegrationEvaluationContextAware, org.springframework.integration.history.TrackableComponent, org.springframework.integration.support.context.NamedComponent, org.springframework.messaging.MessageHandler

public class KafkaProducerMessageHandler<K,V>
extends org.springframework.integration.handler.AbstractMessageHandler
implements org.springframework.integration.expression.IntegrationEvaluationContextAware

Since:
0.5
Author:
Soby Chacko, Artem Bilan, Gary Russell

Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
KafkaProducerMessageHandler(KafkaProducerContext<K,V> kafkaProducerContext)
           
 
Method Summary
 java.lang.String getComponentType()
           
 KafkaProducerContext<K,V> getKafkaProducerContext()
           
protected  void handleMessageInternal(org.springframework.messaging.Message<?> message)
           
protected  void onInit()
           
 void setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext)
           
 void setMessageKeyExpression(org.springframework.expression.Expression messageKeyExpression)
           
 void setTopicExpression(org.springframework.expression.Expression topicExpression)
           
 
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
getOrder, handleMessage, setOrder, setShouldTrack
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, 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.context.NamedComponent
getComponentName
 

Constructor Detail

KafkaProducerMessageHandler

public KafkaProducerMessageHandler(KafkaProducerContext<K,V> kafkaProducerContext)
Method Detail

setIntegrationEvaluationContext

public void setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext)
Specified by:
setIntegrationEvaluationContext in interface org.springframework.integration.expression.IntegrationEvaluationContextAware

setTopicExpression

public void setTopicExpression(org.springframework.expression.Expression topicExpression)

setMessageKeyExpression

public void setMessageKeyExpression(org.springframework.expression.Expression messageKeyExpression)

getKafkaProducerContext

public KafkaProducerContext<K,V> getKafkaProducerContext()

onInit

protected void onInit()
               throws java.lang.Exception
Overrides:
onInit in class org.springframework.integration.context.IntegrationObjectSupport
Throws:
java.lang.Exception

handleMessageInternal

protected void handleMessageInternal(org.springframework.messaging.Message<?> message)
                              throws java.lang.Exception
Specified by:
handleMessageInternal in class org.springframework.integration.handler.AbstractMessageHandler
Throws:
java.lang.Exception

getComponentType

public java.lang.String getComponentType()
Specified by:
getComponentType in interface org.springframework.integration.support.context.NamedComponent
Overrides:
getComponentType in class org.springframework.integration.handler.AbstractMessageHandler

Spring Integration Kafka Support