public class HdfsStoreMessageHandler
extends org.springframework.integration.handler.AbstractMessageHandler
implements org.springframework.context.SmartLifecycle
MessageHandler
handling Message
writing into hdfs using DataStoreWriter
.Constructor and Description |
---|
HdfsStoreMessageHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart()
Subclasses may override this method with the start behaviour.
|
protected void |
doStop()
Subclasses may override this method with the stop behaviour.
|
protected void |
doWrite(org.springframework.messaging.Message<?> message)
Writes a
Message into a DataStoreWriter . |
int |
getPhase() |
protected void |
handleMessageInternal(org.springframework.messaging.Message<?> message) |
boolean |
isAutoStartup() |
boolean |
isRunning() |
protected void |
onInit() |
void |
setAutoStartup(boolean autoStartup)
Sets the auto startup.
|
void |
setPhase(int phase)
Sets the phase.
|
void |
setStoreWriter(org.springframework.data.hadoop.store.DataStoreWriter<java.lang.String> storeWriter)
Sets the store writer.
|
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
getComponentType, getOrder, handleMessage, setOrder, setShouldTrack
afterPropertiesSet, getApplicationContextId, getBeanFactory, getComponentName, getConversionService, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, setApplicationContext, setBeanFactory, setBeanName, setComponentName, setConversionService, setMessageBuilderFactory, setTaskScheduler, toString
public final boolean isAutoStartup()
isAutoStartup
in interface org.springframework.context.SmartLifecycle
public final int getPhase()
getPhase
in interface org.springframework.context.Phased
public final boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
public final void start()
start
in interface org.springframework.context.Lifecycle
public final void stop()
stop
in interface org.springframework.context.Lifecycle
public final void stop(java.lang.Runnable callback)
stop
in interface org.springframework.context.SmartLifecycle
protected void handleMessageInternal(org.springframework.messaging.Message<?> message) throws java.lang.Exception
handleMessageInternal
in class org.springframework.integration.handler.AbstractMessageHandler
java.lang.Exception
protected void onInit() throws java.lang.Exception
onInit
in class org.springframework.integration.context.IntegrationObjectSupport
java.lang.Exception
public void setAutoStartup(boolean autoStartup)
autoStartup
- the new auto startupSmartLifecycle
public void setPhase(int phase)
phase
- the new phaseSmartLifecycle
public void setStoreWriter(org.springframework.data.hadoop.store.DataStoreWriter<java.lang.String> storeWriter)
storeWriter
- the new store writerprotected void doStart()
lifecycleLock
.protected void doStop()
lifecycleLock
.protected void doWrite(org.springframework.messaging.Message<?> message)
Message
into a DataStoreWriter
.message
- the message