@Test public void testDestroy() { LOGGER.info("XACMLPdpServletTest - testDestroy"); try { pdpServlet.init(servletConfig); pdpServlet.destroy(); } catch (Exception e) { LOGGER.error(ERROR_TEXT + e); fail(); } }
@Override public void destroy() { super.destroy(); logger.info("Destroying...."); if (XACMLPdpServlet.registerRunnable != null) { try { XACMLPdpServlet.registerRunnable.terminate(); if (XACMLPdpServlet.registerThread != null) { XACMLPdpServlet.registerThread.interrupt(); XACMLPdpServlet.registerThread.join(); } } catch (InterruptedException e) { logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e); PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR, e, ""); XACMLPdpServlet.registerThread.interrupt(); } } setConfigThreadTerminate(true); try { XACMLPdpServlet.configThread.interrupt(); XACMLPdpServlet.configThread.join(); } catch (InterruptedException e) { logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e); PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR, e, ""); XACMLPdpServlet.configThread.interrupt(); } logger.info("Destroyed."); }
XACMLPdpServlet extends HttpServlet implements Runnable { @Override public void destroy() { super.destroy(); logger.info("Destroying...."); if (XACMLPdpServlet.registerRunnable != null) { try { XACMLPdpServlet.registerRunnable.terminate(); if (XACMLPdpServlet.registerThread != null) { XACMLPdpServlet.registerThread.interrupt(); XACMLPdpServlet.registerThread.join(); } } catch (InterruptedException e) { logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e); PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR, e, ""); XACMLPdpServlet.registerThread.interrupt(); } } setConfigThreadTerminate(true); try { XACMLPdpServlet.configThread.interrupt(); XACMLPdpServlet.configThread.join(); } catch (InterruptedException e) { logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e); PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR, e, ""); XACMLPdpServlet.configThread.interrupt(); } logger.info("Destroyed."); } }
XACMLPdpServlet extends HttpServlet implements Runnable { @Override public void destroy() { super.destroy(); logger.info("Destroying...."); if (XACMLPdpServlet.registerRunnable != null) { try { XACMLPdpServlet.registerRunnable.terminate(); if (XACMLPdpServlet.registerThread != null) { XACMLPdpServlet.registerThread.interrupt(); XACMLPdpServlet.registerThread.join(); } } catch (InterruptedException e) { logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e); PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR, e, ""); XACMLPdpServlet.registerThread.interrupt(); } } setConfigThreadTerminate(true); try { XACMLPdpServlet.configThread.interrupt(); XACMLPdpServlet.configThread.join(); } catch (InterruptedException e) { logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e); PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR, e, ""); XACMLPdpServlet.configThread.interrupt(); } logger.info("Destroyed."); } XACMLPdpServlet(); }
XACMLPdpServlet extends HttpServlet implements Runnable { @Override public void destroy() { super.destroy(); logger.info("Destroying...."); if (XACMLPdpServlet.registerRunnable != null) { try { XACMLPdpServlet.registerRunnable.terminate(); if (XACMLPdpServlet.registerThread != null) { XACMLPdpServlet.registerThread.interrupt(); XACMLPdpServlet.registerThread.join(); } } catch (InterruptedException e) { logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e); PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR, e, ""); XACMLPdpServlet.registerThread.interrupt(); } } setConfigThreadTerminate(true); try { XACMLPdpServlet.configThread.interrupt(); XACMLPdpServlet.configThread.join(); } catch (InterruptedException e) { logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e); PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR, e, ""); XACMLPdpServlet.configThread.interrupt(); } logger.info("Destroyed."); } XACMLPdpServlet(); static int getNotificationDelay(); IntegrityMonitor getIm(); void setIm(IntegrityMonitor im); @Override void init(ServletConfig config); @Override void destroy(); @Override void run(); static PDPEngine getPDPEngine(); static Constructor<?> getCreateUpdatePolicyConstructor(); static Object getPDPEngineLock(); }
XACMLPdpServlet extends HttpServlet implements Runnable { @Override public void destroy() { super.destroy(); logger.info("Destroying...."); if (XACMLPdpServlet.registerRunnable != null) { try { XACMLPdpServlet.registerRunnable.terminate(); if (XACMLPdpServlet.registerThread != null) { XACMLPdpServlet.registerThread.interrupt(); XACMLPdpServlet.registerThread.join(); } } catch (InterruptedException e) { logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e); PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR, e, ""); XACMLPdpServlet.registerThread.interrupt(); } } setConfigThreadTerminate(true); try { XACMLPdpServlet.configThread.interrupt(); XACMLPdpServlet.configThread.join(); } catch (InterruptedException e) { logger.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + e); PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR, e, ""); XACMLPdpServlet.configThread.interrupt(); } logger.info("Destroyed."); } XACMLPdpServlet(); static int getNotificationDelay(); IntegrityMonitor getIm(); void setIm(IntegrityMonitor im); @Override void init(ServletConfig config); @Override void destroy(); @Override void run(); static PDPEngine getPDPEngine(); static Constructor<?> getCreateUpdatePolicyConstructor(); static Object getPDPEngineLock(); static final PdpRestMonitor monitor; }