public interface EventListenerProvider extends Provider
onEvent
and onAdminEvent
are run within a running
transaction. Hence, if the event processing uses JPA, it can insert event details into a table, and the whole
transaction including the event is either committed or rolled back. However if transaction processing is not
an option, e.g. in the case of log files, it is recommended to hook onto transaction after the commit is complete
via the KeycloakTransactionManager.enlistAfterCompletion(KeycloakTransaction)
method, so
that the events are stacked in memory and only written to the file after the original transaction completes
successfully.Modifier and Type | Method and Description |
---|---|
void |
onEvent(AdminEvent event,
boolean includeRepresentation)
Called when an admin event occurs e.g.
|
void |
onEvent(Event event)
Called when a user event occurs e.g.
|
void onEvent(Event event)
EventListenerProvider
javadoc
for more details.event
- to be triggeredvoid onEvent(AdminEvent event, boolean includeRepresentation)
EventListenerProvider
javadoc
for more details.event
- to be triggeredincludeRepresentation
- when false, event listener should NOT include representation field in the resulting
actionCopyright © 2021 JBoss by Red Hat. All rights reserved.