Class TestEventListenerCountingEvents<T extends AbstractEvent>
- java.lang.Object
-
- de.hybris.platform.servicelayer.event.impl.AbstractEventListener<T>
-
- de.hybris.platform.yacceleratorfulfilmentprocess.test.events.TestEventListenerCountingEvents<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
java.util.EventListener,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<T>
- Direct Known Subclasses:
FraudCheckIntegrationTest.OrderFraudCustomerEventListener,FraudCheckIntegrationTest.OrderFraudEmployeeEventListener,FraudCheckIntegrationTest.OrderPlacedEventListener
public class TestEventListenerCountingEvents<T extends AbstractEvent> extends AbstractEventListener<T>
Event Listener which only count number of onEvent() invocations
-
-
Constructor Summary
Constructors Constructor Description TestEventListenerCountingEvents()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetNumberOfEvents()protected voidonEvent(T event)This method is called byApplicationListener.onApplicationEvent(ApplicationEvent)and processes the given event.voidresetCounter()reset counter which store number of onEvent() invocations-
Methods inherited from class de.hybris.platform.servicelayer.event.impl.AbstractEventListener
afterPropertiesSet, onApplicationEvent, setApplicationContext, setClusterService, setTenantService
-
-
-
-
Method Detail
-
onEvent
protected void onEvent(T event)
Description copied from class:AbstractEventListenerThis method is called byApplicationListener.onApplicationEvent(ApplicationEvent)and processes the given event.- Specified by:
onEventin classAbstractEventListener<T extends AbstractEvent>- Parameters:
event- the event to be processed- See Also:
ApplicationListener.onApplicationEvent(ApplicationEvent)
-
getNumberOfEvents
public int getNumberOfEvents()
- Returns:
- number of onEvent invocation since beginning or last resetCounter() invocation
-
resetCounter
public void resetCounter()
reset counter which store number of onEvent() invocations
-
-