it's not public API therefore there is no documentation for it. But the simple methods of theses interfaces should speak for themselves. Anyway here is a simple implementation:
package ch.ivyteam.sample;
import ch.ivyteam.di.restricted.DiCore;
import ch.ivyteam.ivy.persistence.IPersistentTransaction;
import ch.ivyteam.ivy.persistence.PersistencyException;
import ch.ivyteam.ivy.security.ISecurityManager;
import ch.ivyteam.ivy.security.ISession;
import ch.ivyteam.ivy.security.ISessionExtension;
public class MyDemoSessionExtension implements ISessionExtension
{
public static void install()
{
DiCore.getGlobalInjector().getInstance(ISecurityManager.class)
.addSessionExtension(new MyDemoSessionExtension());
}
@Override
public void createSession(ISession session, IPersistentTransaction transaction)
throws PersistencyException {
System.err.println("created session "+session);
}
@Override
public void destroySession(ISession session, IPersistentTransaction transaction)
throws PersistencyException {
System.err.println("session destroyed "+session);
}
@Override
public void logoutSession(ISession session, IPersistentTransaction transaction,
long currentTaskId) throws PersistencyException {
System.err.println("session logout "+session);
}
}
The easiest way to register this Session extension is with a 'Program Start' event bean that runs when the server is up and running.