Ensure example code in SPI chapter compiles (#5)

This commit is contained in:
Marek Posolda 2016-06-08 08:10:04 +02:00 committed by Stian Thorgersen
parent 213783ff42
commit ea0ef24dd3

View file

@ -32,6 +32,9 @@ public class MyEventListenerProviderFactory implements EventListenerProviderFact
events = new LinkedList();
}
public void postInit(KeycloakSessionFactory factory) {
}
public EventListenerProvider create(KeycloakSession session) {
return new MyEventListenerProvider(events);
}
@ -69,6 +72,11 @@ public class MyEventListenerProvider implements EventListenerProvider {
public void close() {
}
@Override
public void onEvent(AdminEvent event, boolean includeRepresentation) {
// Assume this implementation just ignores admin events
}
}
----
@ -123,6 +131,8 @@ public class MyEventListenerProvider implements EventListenerProvider {
emailSender.send(realm, user, "Hello", "Hello plain text", "<h1>Hello html</h1>" );
}
...
}
----