You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A support class used as part of setting an exception handler for a specific event handler.
*
* \tparam T the type of event being handled.
*/
template <classT>
classExceptionHandlerSetting
{
public:
ExceptionHandlerSetting(const std::shared_ptr< IEventHandler< T > >& eventHandler,
const std::shared_ptr< ConsumerRepository< T > >& consumerRepository)
: m_eventHandler(eventHandler)
, m_consumerRepository(consumerRepository)
{
}
/**
* Specify the IExceptionHandler<T> to use with the event handler.
*
* \param exceptionHandler exceptionHandler the exception handler to use.
*/
voidwith(const std::shared_ptr< IExceptionHandler< T > >& exceptionHandler)
{
std::dynamic_pointer_cast< BatchEventProcessor< T > >(m_consumerRepository->getEventProcessorFor(m_eventHandler))->setExceptionHandler(exceptionHandler);