Asynchronous call to save a session. @param fileName @param callback
(final String fileName, final SessionListener callback)
| 599 | * @param callback |
| 600 | */ |
| 601 | protected void save(final String fileName, final SessionListener callback) { |
| 602 | Thread t = |
| 603 | new Thread( |
| 604 | new Runnable() { |
| 605 | @Override |
| 606 | public void run() { |
| 607 | Exception thrownException = null; |
| 608 | try { |
| 609 | save(fileName); |
| 610 | } catch (Exception e) { |
| 611 | // ZAP: Log exceptions |
| 612 | LOGGER.warn(e.getMessage(), e); |
| 613 | thrownException = e; |
| 614 | } |
| 615 | if (callback != null) { |
| 616 | callback.sessionSaved(thrownException); |
| 617 | } |
| 618 | } |
| 619 | }); |
| 620 | t.setPriority(Thread.NORM_PRIORITY - 2); |
| 621 | t.start(); |
| 622 | } |
| 623 | |
| 624 | /** |
| 625 | * Synchronous call to save a session. |
no test coverage detected