public abstract class AbstractContextBasedEventHandler extends Object implements IEventHandler
Modifier | Constructor and Description |
---|---|
protected |
AbstractContextBasedEventHandler(IContext onUnknownContext)
Creates a new instance of the handler with the defined fallback for events within unknown contexts.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
onAcceptedEvent(AbstractContextBasedITextEvent event)
Handles the accepted event.
|
void |
onEvent(IEvent event)
Performs context validation and if event is allowed to be processed passes it to onAcceptedEvent(AbstractContextBasedITextEvent) .
|
protected AbstractContextBasedEventHandler(IContext onUnknownContext)
onUnknownContext
- is a fallback for events within unknown context
public final void onEvent(IEvent event)
onAcceptedEvent(AbstractContextBasedITextEvent)
.
onEvent
in interface IEventHandler
event
- to handle
protected abstract void onAcceptedEvent(AbstractContextBasedITextEvent event)
event
- to handle
Copyright © 1998–2022 iText Group NV. All rights reserved.