|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.core.listener.StepExecutionListenerSupport
org.springframework.batch.integration.chunk.ChunkMessageChannelItemWriter
public class ChunkMessageChannelItemWriter
| Constructor Summary | |
|---|---|
ChunkMessageChannelItemWriter()
|
|
| Method Summary | |
|---|---|
ExitStatus |
afterStep(StepExecution stepExecution)
Give a listener a chance to modify the exit status from a step. |
void |
beforeStep(StepExecution stepExecution)
Initialise the state of the listener with the StepExecution from
the current scope. |
void |
clear()
Clear the buffer. |
void |
close(ExecutionContext executionContext)
If any resources are needed for the stream to operate they need to be destroyed here. |
void |
flush()
Flush the buffer, sending the items as a chunk message to be processed by a ChunkHandler. |
void |
open(ExecutionContext executionContext)
Open the stream for the provided ExecutionContext. |
void |
setReplyChannel(org.springframework.integration.channel.MessageChannel replyChannel)
|
void |
setRequestChannel(org.springframework.integration.channel.MessageChannel requestChannel)
|
void |
setThrottleLimit(long throttleLimit)
Public setter for the throttle limit. |
void |
update(ExecutionContext executionContext)
Indicates that the execution context provided during open is about to be saved. |
void |
write(Object item)
Process the supplied data element. |
| Methods inherited from class org.springframework.batch.core.listener.StepExecutionListenerSupport |
|---|
onErrorInStep |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChunkMessageChannelItemWriter()
| Method Detail |
|---|
public void setThrottleLimit(long throttleLimit)
throttleLimit - the throttle limit to setpublic void setReplyChannel(org.springframework.integration.channel.MessageChannel replyChannel)
public void setRequestChannel(org.springframework.integration.channel.MessageChannel requestChannel)
public void write(Object item)
throws Exception
ItemWriter
write in interface ItemWriterException - if there are errors. If the writer is used inside a
retry or a batch the framework will catch the exception and convert or
rethrow it as appropriate.
public void flush()
throws FlushFailedException
ChunkHandler. To avoid overwhelming the receivers, this method
will block until the number of chunks pending is less than the throttle
limit.
flush in interface ItemWriterFlushFailedException - in case of an error. If this exception is
thrown the writer may be in an inconsistent state and manual intervention
might be required to reconcile the data with persistent output.ItemWriter.flush()public void beforeStep(StepExecution stepExecution)
StepExecutionListenerStepExecution from
the current scope.
beforeStep in interface StepExecutionListenerbeforeStep in class StepExecutionListenerSupportpublic ExitStatus afterStep(StepExecution stepExecution)
StepExecutionListenerExitStatus.and(ExitStatus).
Called after successful execution of step's processing logic. Throwing
exception in this method will cause step to fail.
afterStep in interface StepExecutionListenerafterStep in class StepExecutionListenerSupportExitStatus to combine with the normal value. Return
null to leave the old value unchanged.
public void close(ExecutionContext executionContext)
throws ItemStreamException
ItemStream
close in interface ItemStreamexecutionContext - the current execution context in case it is needed
ItemStreamException
public void open(ExecutionContext executionContext)
throws ItemStreamException
ItemStreamExecutionContext.
open in interface ItemStreamItemStreamException
public void update(ExecutionContext executionContext)
throws ItemStreamException
ItemStream
update in interface ItemStreamexecutionContext - to be updated
ItemStreamException
public void clear()
throws ClearFailedException
clear in interface ItemWriterClearFailedException - in case of an error. If this exception is
thrown the writer may be in an inconsistent state and manual intervention
might be required to reconcile the data with persistent output.ItemWriter.clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||