Class BeanIOErrorHandler
- java.lang.Object
-
- org.beanio.BeanReaderErrorHandlerSupport
-
- org.apache.camel.dataformat.beanio.BeanIOErrorHandler
-
- All Implemented Interfaces:
org.beanio.BeanReaderErrorHandler
public class BeanIOErrorHandler extends org.beanio.BeanReaderErrorHandlerSupportABeanReaderErrorHandlerto handle errors during parsing. This error handler is prototype scoped and provides access to the currentExchange. You can perform any custom initialization logic in theinit()method.
-
-
Constructor Summary
Constructors Constructor Description BeanIOErrorHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BeanIOConfigurationgetConfiguration()The configurationorg.apache.camel.ExchangegetExchange()The current exchangevoidhandleErrorAndAddAsResult(Object result)Sets a custom POJO as the result from handling an beanio error.voidinit()voidinvalidRecord(org.beanio.InvalidRecordException ex)voidsetConfiguration(BeanIOConfiguration configuration)voidsetExchange(org.apache.camel.Exchange exchange)voidunexpectedRecord(org.beanio.UnexpectedRecordException ex)voidunidentifiedRecord(org.beanio.UnidentifiedRecordException ex)
-
-
-
Method Detail
-
init
public void init()
-
getConfiguration
public BeanIOConfiguration getConfiguration()
The configuration
-
setConfiguration
public void setConfiguration(BeanIOConfiguration configuration)
-
getExchange
public org.apache.camel.Exchange getExchange()
The current exchange
-
setExchange
public void setExchange(org.apache.camel.Exchange exchange)
-
handleErrorAndAddAsResult
public void handleErrorAndAddAsResult(Object result)
Sets a custom POJO as the result from handling an beanio error.
-
invalidRecord
public void invalidRecord(org.beanio.InvalidRecordException ex) throws Exception- Overrides:
invalidRecordin classorg.beanio.BeanReaderErrorHandlerSupport- Throws:
Exception
-
unexpectedRecord
public void unexpectedRecord(org.beanio.UnexpectedRecordException ex) throws Exception- Overrides:
unexpectedRecordin classorg.beanio.BeanReaderErrorHandlerSupport- Throws:
Exception
-
-