1 | public class CloseSessionAction extends SquirrelAction↵ | | 1 | public class CloseSessionWindowAction extends SquirrelAction↵
|
2 | implements ISessionAction↵ | | 2 | implements ISessionAction↵
|
3 | {↵ | | 3 | {↵
|
4 | /** Logger for this class. */↵ | | 4 | /** Logger for this class. */↵
|
5 | private final static ILogger s_log =↵ | | 5 | private final static ILogger s_log =↵
|
6 | LoggerController.createLogger(DumpSessionAction.class);↵ | | 6 | LoggerController.createLogger(DumpSessionAction.class);↵
|
|
7 | private ISession _session;↵ | | 7 | private ISession _session;↵
|
|
8 | public CloseSessionAction(IApplication app)↵ | | 8 | public CloseSessionWindowAction(IApplication app)↵
|
9 | {↵ | | 9 | {↵
|
10 | super(app);↵ | | 10 | super(app);↵
|
11 | }↵ | | 11 | }↵
|
|
12 | public void setSession(ISession session)↵ | | 12 | public void setSession(ISession session)↵
|
13 | {↵ | | 13 | {↵
|
14 | _session = session;↵ | | 14 | _session = session;↵
|
15 | }↵ | | 15 | }↵
|
|
16 | public void actionPerformed(ActionEvent evt)↵ | | 16 | public void actionPerformed(ActionEvent evt)↵
|
17 | {↵ | | 17 | {↵
|
18 | if (_session != null)↵ | | 18 | if (_session != null)↵
|
19 | {↵ | | 19 | {↵
|
20 | try↵ | | 20 | try↵
|
21 | {↵ | | 21 | {↵
|
22 | new CloseSessionCommand(_session).execute();↵ | | 22 | new CloseSessionWindowCommand(_session).execute();↵
|
23 | }↵ | | 23 | }↵
|
24 | catch (Throwable ex)↵ | | 24 | catch (Throwable ex)↵
|
25 | {↵ | | 25 | {↵
|
26 | final String msg = "Error occured closing session";↵ | | 26 | final String msg = "Error occured closing session";↵
|
27 | _session.showErrorMessage(msg + ": " + ex);↵ | | 27 | _session.showErrorMessage(msg + ": " + ex);↵
|
28 | s_log.error(msg, ex) | | 28 | s_log.error(msg, ex)
|