Class AbstractContextBasedEventHandler
java.lang.Object
com.itextpdf.commons.actions.AbstractContextBasedEventHandler
- All Implemented Interfaces:
IEventHandler
- Direct Known Subclasses:
ProductEventHandler
Base class for events handling depending on the context.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractContextBasedEventHandler(IContext onUnknownContext) Creates a new instance of the handler with the defined fallback for events within unknown contexts. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidHandles the accepted event.final voidPerforms context validation and if event is allowed to be processed passes it toonAcceptedEvent(AbstractContextBasedITextEvent).
-
Field Details
-
defaultContext
-
-
Constructor Details
-
AbstractContextBasedEventHandler
Creates a new instance of the handler with the defined fallback for events within unknown contexts.- Parameters:
onUnknownContext- is a fallback for events within unknown context
-
-
Method Details
-
onEvent
Performs context validation and if event is allowed to be processed passes it toonAcceptedEvent(AbstractContextBasedITextEvent).- Specified by:
onEventin interfaceIEventHandler- Parameters:
event- to handle
-
onAcceptedEvent
Handles the accepted event.- Parameters:
event- to handle
-