private void registerSessionListener() {
        ISessionLifecycle sessionTracker = new ISessionLifecycle() {
            
            @Override
            public void onSessionCreate(Session session) {
                try {
                    AppContextFinder.createAppContext(session.getPage());
                } catch (Exception e) {
                    throw new SessionInitException(e);
                }
            }
            
            @Override
            public void onSessionDestroy(Session session) {
                AppContextFinder.destroyAppContext(session.getPage());
            }
            
        };

        Sessions.getInstance().addLifecycleListener(sessionTracker);
    }
private void registerSessionListener ( ) { ISessionLifecycle sessionTracker = new ISessionLifecycle ( ) { @ Override public void onSessionCreate ( Session session ) { try { AppContextFinder . createAppContext ( session . getPage ( ) ) ; } catch ( Exception e ) { throw new SessionInitException ( e ) ; } } @ Override public void onSessionDestroy ( Session session ) { AppContextFinder . destroyAppContext ( session . getPage ( ) ) ; } } ; Sessions . getInstance ( ) . addLifecycleListener ( sessionTracker ) ; }
Manages creation/destruction of child contexts.