@Override public void close() { close(5000); }
@Override public void close() { close(5000); }
@Override public void close() { close(5000); }
@Override public void close() { close(5000); }
@Override public void close() { if (this.defaultSmppSession != null) { try { defaultSmppSession.close(); } catch (Exception e) { logger.error(String.format("Failed to close smpp session for %s.", defaultSmppSession.getConfiguration().getName())); } } }
@Override public void close(long arg0) { if (this.defaultSmppSession != null) { try { defaultSmppSession.close(arg0); } catch (Exception e) { logger.error(String.format("Failed to close smpp session for %s.", defaultSmppSession.getConfiguration().getName())); } } }
@Override public void close() { if (this.defaultSmppSession != null) { try { defaultSmppSession.close(); } catch (Exception e) { logger.error(String.format("Failed to close smpp session for %s.", defaultSmppSession.getConfiguration().getName())); } } }
@Override public void close(long arg0) { if (this.defaultSmppSession != null) { try { defaultSmppSession.close(arg0); } catch (Exception e) { logger.error(String.format("Failed to close smpp session for %s.", defaultSmppSession.getConfiguration().getName())); } } }
@Override public void destroy() { close(); this.sendWindow.destroy(); if (this.counters != null) { this.counters.reset(); } // make sure to lose the reference to to the session handler - many // users of this class will probably pass themselves as the reference // and this may help to prevent a circular reference this.sessionHandler = null; }
@Override public void destroy() { close(); this.sendWindow.destroy(); if (this.counters != null) { this.counters.reset(); } // make sure to lose the reference to to the session handler - many // users of this class will probably pass themselves as the reference // and this may help to prevent a circular reference this.sessionHandler = null; }
@Override public void destroy() { close(); this.sendWindow.destroy(); if (this.counters != null) { this.counters.reset(); } // make sure to lose the reference to to the session handler - many // users of this class will probably pass themselves as the reference // and this may help to prevent a circular reference this.sessionHandler = null; }
@Override public void destroy() { close(); this.sendWindow.destroy(); if (this.counters != null) { this.counters.reset(); } // make sure to lose the reference to to the session handler - many // users of this class will probably pass themselves as the reference // and this may help to prevent a circular reference this.sessionHandler = null; }
@Override public void fireUnrecoverablePduException(UnrecoverablePduException e) { // TODO shall we call wrapped? this.wrappedSmppSessionHandler.fireUnrecoverablePduException(e); this.esme.getSmppSession().close(); // Schedule the connection again scheduleConnect(this.esme); }
@Override public void fireChannelUnexpectedlyClosed() { this.wrappedSmppSessionHandler.fireChannelUnexpectedlyClosed(); this.esme.getSmppSession().close(); // Schedule the connection again scheduleConnect(this.esme); }
@Override public void fireUnknownThrowable(Throwable e) { this.wrappedSmppSessionHandler.fireUnknownThrowable(e); // TODO is this ok? this.esme.getSmppSession().close(); // Schedule the connection again scheduleConnect(this.esme); }
@Override public void fireUnrecoverablePduException(UnrecoverablePduException e) { // TODO shall we call wrapped? this.wrappedSmppSessionHandler.fireUnrecoverablePduException(e); this.esme.getSmppSession().close(); // Schedule the connection again scheduleConnect(this.esme); }
@Override public SmppSession bind(SmppSessionConfiguration config, SmppSessionHandler sessionHandler) throws SmppTimeoutException, SmppChannelException, SmppBindException, UnrecoverablePduException, InterruptedException { DefaultSmppSession session = null; try { // connect to the remote system and create the session session = doOpen(config, sessionHandler); // try to bind to the remote system (may throw an exception) doBind(session, config, sessionHandler); } finally { // close the session if we weren't able to bind correctly if (session != null && !session.isBound()) { // make sure that the resources are always cleaned up try { session.close(); } catch (Exception e) { } } } return session; }
@Override public SmppSession bind(SmppSessionConfiguration config, SmppSessionHandler sessionHandler) throws SmppTimeoutException, SmppChannelException, SmppBindException, UnrecoverablePduException, InterruptedException { DefaultSmppSession session = null; try { // connect to the remote system and create the session session = doOpen(config, sessionHandler); // try to bind to the remote system (may throw an exception) doBind(session, config, sessionHandler); } finally { // close the session if we weren't able to bind correctly if (session != null && !session.isBound()) { // make sure that the resources are always cleaned up try { session.close(); } catch (Exception e) { } } } return session; }
@Override public void fireChannelUnexpectedlyClosed() { this.wrappedSmppSessionHandler.fireChannelUnexpectedlyClosed(); if (this.esme.getSmppSession() != null) { this.esme.getSmppSession().close(); } // Schedule the connection again scheduleConnect(this.esme); }
@Override public void fireUnknownThrowable(Throwable e) { this.wrappedSmppSessionHandler.fireUnknownThrowable(e); // TODO is this ok? if (this.esme.getSmppSession() != null) { this.esme.getSmppSession().close(); } // Schedule the connection again scheduleConnect(this.esme); }