package com.jeeplus.modules.sg.audit.information.utils;

import org.apache.shiro.session.Session;
import org.apache.shiro.session.SessionListener;

public class SessionListener1 implements SessionListener {
    @Override
    public void onStart(Session session) {

    }

    @Override
    public void onStop(Session session) {
        Object path = session.getAttribute("path");
        if (path != null && path != "") {
            RandomUtil.delete(path.toString());
            session.removeAttribute("path");
        }
    }

    @Override
    public void onExpiration(Session session) {
        Object path = session.getAttribute("path");
        if (path != null && path != "") {
            RandomUtil.delete(path.toString());
            session.removeAttribute("path");
        }
    }
}
