Class EventManager
java.lang.Object
com.itextpdf.commons.actions.EventManager
Entry point for event handling mechanism. Class is a singleton,
see
getInstance().-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConcurrentHashSet<IEventHandler> private static final EventManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeliberately turns off the warning message about AGPL usage.static EventManagerAllows access to the instance of EventManager.booleanisRegistered(IEventHandler handler) Check if the handler was registered for event handling process.voidHandles the event.voidregister(IEventHandler handler) Add newIEventHandlerto the event handling process.booleanunregister(IEventHandler handler) Removes handler from event handling process.
-
Field Details
-
INSTANCE
-
handlers
-
-
Constructor Details
-
EventManager
private EventManager()
-
-
Method Details
-
getInstance
Allows access to the instance of EventManager.- Returns:
- the instance of the class
-
acknowledgeAgplUsageDisableWarningMessage
public static void acknowledgeAgplUsageDisableWarningMessage()Deliberately turns off the warning message about AGPL usage.Important note. Calling of this method means that the terms of AGPL license are met.
-
onEvent
-
register
Add newIEventHandlerto the event handling process.- Parameters:
handler- is a handler to add
-
isRegistered
Check if the handler was registered for event handling process.- Parameters:
handler- is a handler to check- Returns:
- true if handler has been already registered and false otherwise
-
unregister
Removes handler from event handling process.- Parameters:
handler- is a handle to remove- Returns:
- true if the handler had been registered previously and was removed. False if the handler was not found among registered handlers
-