com.alibaba.excel.read.listener
接口 ReadListener<T>
-
- 所有超级接口:
- Listener
- 所有已知实现类:
- AbstractIgnoreExceptionReadListener, AnalysisEventListener, ModelBuildEventListener, SyncReadListener
public interface ReadListener<T> extends Listener
Interface to listen for read results- 作者:
- Jiaju Zhuang
-
方法概要
所有方法 实例方法 抽象方法 限定符和类型 方法和说明 void
doAfterAllAnalysed(AnalysisContext context)
if have something to do after all analysisboolean
hasNext(AnalysisContext context)
Verify that there is another piece of data.You can stop the read by returning falsevoid
invoke(T data, AnalysisContext context)
When analysis one row trigger invoke function.void
invokeHead(Map<Integer,CellData> headMap, AnalysisContext context)
When analysis one head row trigger invoke function.void
onException(Exception exception, AnalysisContext context)
All listeners receive this method when any one Listener does an error report.
-
方法详细资料
onException
void onException(Exception exception, AnalysisContext context) throws Exception
All listeners receive this method when any one Listener does an error report. If an exception is thrown here, the entire read will terminate.- 参数:
-
exception
- -
context
- - 抛出:
-
Exception
invokeHead
void invokeHead(Map<Integer,CellData> headMap, AnalysisContext context)
When analysis one head row trigger invoke function.- 参数:
-
headMap
- -
context
-
invoke
void invoke(T data, AnalysisContext context)
When analysis one row trigger invoke function.- 参数:
-
data
- one row value. Is is same asAnalysisContext.readRowHolder()
-
context
- analysis context
doAfterAllAnalysed
void doAfterAllAnalysed(AnalysisContext context)
if have something to do after all analysis- 参数:
-
context
-
hasNext
boolean hasNext(AnalysisContext context)
Verify that there is another piece of data.You can stop the read by returning false- 参数:
-
context
- - 返回:
Copyright © 2018–2019 Alibaba Group. All rights reserved.