Spring Integration Kafka Support

org.springframework.integration.kafka.support
Class KafkaProducerContext<K,V>

java.lang.Object
  extended by org.springframework.integration.kafka.support.KafkaProducerContext<K,V>
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, org.springframework.integration.support.context.NamedComponent

public class KafkaProducerContext<K,V>
extends java.lang.Object
implements org.springframework.context.SmartLifecycle, org.springframework.integration.support.context.NamedComponent, org.springframework.beans.factory.BeanNameAware

Since:
0.5
Author:
Soby Chacko, Rajasekar Elango, Ilayaperumal Gopinathan, Gary Russell, Artem Bilan, Marius Bogoevici

Constructor Summary
KafkaProducerContext()
           
 
Method Summary
protected  void doStart()
           
protected  void doStop()
           
 java.lang.String getComponentName()
           
 java.lang.String getComponentType()
           
 int getPhase()
           
 java.util.Map<java.lang.String,ProducerConfiguration<K,V>> getProducerConfigurations()
           
 ProducerConfiguration<K,V> getTopicConfiguration(java.lang.String topic)
           
 boolean isAutoStartup()
           
 boolean isRunning()
           
 void send(java.lang.String topic, java.lang.Object messageKey, org.springframework.messaging.Message<?> message)
           
 void setAutoStartup(boolean autoStartup)
           
 void setBeanName(java.lang.String name)
           
 void setPhase(int phase)
           
 void setProducerConfigurations(java.util.Map<java.lang.String,ProducerConfiguration<K,V>> producerConfigurations)
           
 void start()
           
 void stop()
           
 void stop(java.lang.Runnable callback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KafkaProducerContext

public KafkaProducerContext()
Method Detail

getTopicConfiguration

public ProducerConfiguration<K,V> getTopicConfiguration(java.lang.String topic)

getProducerConfigurations

public java.util.Map<java.lang.String,ProducerConfiguration<K,V>> getProducerConfigurations()

setProducerConfigurations

public void setProducerConfigurations(java.util.Map<java.lang.String,ProducerConfiguration<K,V>> producerConfigurations)

getComponentType

public java.lang.String getComponentType()
Specified by:
getComponentType in interface org.springframework.integration.support.context.NamedComponent
Returns:
the component type.
Since:
1.0

setBeanName

public void setBeanName(java.lang.String name)
Specified by:
setBeanName in interface org.springframework.beans.factory.BeanNameAware
Parameters:
name - the bean name.
Since:
1.0

setPhase

public void setPhase(int phase)
Parameters:
phase - the phase to set.
Since:
1.0
See Also:
SmartLifecycle

setAutoStartup

public void setAutoStartup(boolean autoStartup)
Parameters:
autoStartup - the autoStartup to set.
Since:
1.0
See Also:
SmartLifecycle

getComponentName

public java.lang.String getComponentName()
Specified by:
getComponentName in interface org.springframework.integration.support.context.NamedComponent
Returns:
the component name.
Since:
1.0

doStart

protected void doStart()

doStop

protected void doStop()

start

public final void start()
Specified by:
start in interface org.springframework.context.Lifecycle

stop

public final void stop()
Specified by:
stop in interface org.springframework.context.Lifecycle

isRunning

public boolean isRunning()
Specified by:
isRunning in interface org.springframework.context.Lifecycle

getPhase

public int getPhase()
Specified by:
getPhase in interface org.springframework.context.Phased

isAutoStartup

public boolean isAutoStartup()
Specified by:
isAutoStartup in interface org.springframework.context.SmartLifecycle

stop

public void stop(java.lang.Runnable callback)
Specified by:
stop in interface org.springframework.context.SmartLifecycle

send

public void send(java.lang.String topic,
                 java.lang.Object messageKey,
                 org.springframework.messaging.Message<?> message)
          throws java.lang.Exception
Throws:
java.lang.Exception

Spring Integration Kafka Support