@Override public void destroy() { if (this.defaultSmppSession != null) { this.defaultSmppSession.destroy(); } }
@Override public void destroy() { if (this.defaultSmppSession != null) { this.defaultSmppSession.destroy(); } }
smppSession.destroy();
protected void stopSmppClientSession(Esme esme) { DefaultSmppSession smppSession = esme.getSmppSession(); if (smppSession != null) { if (smppSession.isBound()) { try { smppSession.unbind(5000); } catch (Exception e) { logger.error(String.format("Failed to unbind smpp client session for %s.", smppSession.getConfiguration().getName())); } } try { smppSession.close(); } catch (Exception e) { logger.error(String.format("Failed to close smpp client session for %s.", smppSession.getConfiguration().getName())); } // firing of onPduRequestTimeout() for sent messages for which we do not have responses Window<Integer, PduRequest, PduResponse> wind = smppSession.getSendWindow(); Map<Integer, WindowFuture<Integer, PduRequest, PduResponse>> futures = wind.createSortedSnapshot(); for (WindowFuture<Integer, PduRequest, PduResponse> future : futures.values()) { this.logger.warn("Firing of onPduRequestTimeout from SmppClientManagement.stopSmppClientSession() - 1: " + future.getRequest().toString()); smppSession.expired(future); } smppSession.destroy(); } }
smppSession.destroy();
protected void stopSmppClientSession(Esme esme) { DefaultSmppSession smppSession = esme.getSmppSession(); if (smppSession != null) { if (smppSession.isBound()) { try { smppSession.unbind(5000); } catch (Exception e) { logger.error(String.format("Failed to unbind smpp client session for %s.", smppSession.getConfiguration().getName())); } } try { smppSession.close(); } catch (Exception e) { logger.error(String.format("Failed to close smpp client session for %s.", smppSession.getConfiguration().getName())); } // firing of onPduRequestTimeout() for sent messages for which we do not have responses Window<Integer, PduRequest, PduResponse> wind = smppSession.getSendWindow(); Map<Integer, WindowFuture<Integer, PduRequest, PduResponse>> futures = wind.createSortedSnapshot(); for (WindowFuture<Integer, PduRequest, PduResponse> future : futures.values()) { this.logger.warn("Firing of onPduRequestTimeout from SmppClientManagement.stopSmppClientSession() - 1: " + future.getRequest().toString()); smppSession.expired(future); } smppSession.destroy(); } }
smppSession.destroy();
smppSession.destroy();