@OnStopped public void stop() { try { smtp.stop(); getLogger().debug("Stopped SMTP server on port " + smtp.getPort()); }catch (Exception ex){ getLogger().error("Error stopping SMTP server: " + ex.getMessage()); }finally { smtp = null; } }
/** * Stops the server. * <p> * If the server is not started, does nothing special. * </p> */ public void stopServer() { if (smtpServer.isRunning()) { LOGGER.debug("Stopping server"); smtpServer.stop(); } }
public void close() { LOGGER.debug("Closing the application and saving the configuration"); Configuration.INSTANCE.set("smtp.default.port", panel.getPortText().get().getText()); Configuration.INSTANCE.set("emails.default.dir", panel.getSaveMsgTextField().get().getText()); try { Configuration.INSTANCE.saveToUserProfile(); } catch (IOException ex) { LOGGER.error("Could not save configuration", ex); } // Check for SMTP server running and stop it if (SMTPServerHandler.INSTANCE.getSmtpServer().isRunning()) { SMTPServerHandler.INSTANCE.getSmtpServer().stop(); } mainFrame.dispose(); } }
/** Stops the SMTP Server */ public void stop() { this.server.stop(); }
/** Stops the SMTP Server */ public void stop() { this.server.stop(); }
/** * Stops the SMTP Server */ public void stop() { this.server.stop(); }
/** Stops the SMTP Server */ public void stop() { this.server.stop(); }
/** Stops the SMTP Server */ public void stop() { this.server.stop(); }
public void stop() { smtpServer.stop(); log.info("SMTP stopped"); } }
@Override public void shutdown() { serverImpl.stop(); log.info("Inbound SMTP Email Server has stopped successfully"); }
@Override public void shutdown() { serverImpl.stop(); log.info("Inbound SMTP Email Server has stopped successfully"); }
@Override public void stop() { try { smtpReceivingServer.stop(); } catch( Exception e ) { log.debug( "exception stopping smtp receiver: " + e.getMessage()); // probably interrupted ex } smtpReceivingServer = null; }
public void doTest() throws Exception { Wiser wiser = new Wiser(); SMTPServer smtpServer = createServer(new SimpleMessageListenerAdapter(wiser)); smtpServer.setHostName("localhost"); smtpServer.setPort(5000); TestPluginLifeCycle lifeCycle = createLifeCycle(); try { lifeCycle.start(); smtpServer.start(); execute(lifeCycle, wiser); } finally { smtpServer.stop(); lifeCycle.stop(); } } }
/** * Stop the SMTP Server; called by the container on undeployment * * @throws Exception */ @PreDestroy public void shutdown() throws Exception { server.stop(); }
@OnStopped public void stop() { try { smtp.stop(); getLogger().debug("Stopped SMTP server on port " + smtp.getPort()); }catch (Exception ex){ getLogger().error("Error stopping SMTP server: " + ex.getMessage()); }finally { smtp = null; } }