@Override public void sessionDestroyed(Long sessionId, SmppServerSession session) { this.frm.addMessage("Session destroyed", session.getConfiguration().getSystemId()); this.frm.setSmppSession(null); session.destroy(); }
public synchronized void removeServerSession(SmppServerSession session) { if (session.getBindType() == SmppBindType.TRANSMITTER) { // we ignore transmitters as they can not be used to send delivers return; } String systemId = session.getConfiguration().getSystemId(); SessionList sessionList = applicationSessionMap.get(systemId); boolean removed = false; if (sessionList != null) { removed = sessionList.remove(session); globalSessionList.remove(session); } if (!removed) { logger.warn("Failed to remove session %s, Session not found.", session); } }
@Override public void sessionDestroyed(Long sessionId, SmppServerSession session) { logger.info("Session destroyed: {}", session); // print out final stats if (session.hasCounters()) { logger.info(" final session rx-submitSM: {}", session.getCounters().getRxSubmitSM()); } sessionManager.removeServerSession(session); // make sure it's really shutdown session.destroy(); }
protected void send(PduRequest pdu) throws Exception { SmppServerSession session = sessionManager.getNextServerSession(); if (session != null && session.isBound()) { session.sendRequestPdu(pdu, 1000, false); } else { logger.info("Session does not exist or is not bound {}. Deliver not sent {}", session, pdu); } }
@Override public void sessionCreated(Long sessionId, SmppServerSession session, BaseBindResp preparedBindResponse) throws SmppProcessingException { if (this.frm.getSmppSession() != null) { throw new SmppProcessingException(SmppConstants.STATUS_INVBNDSTS); } this.frm.addMessage("Session created", session.getConfiguration().getSystemId()); this.frm.setSmppSession(session); session.serverReady(new ClientSmppSessionHandler(this.frm)); }
@Override public void sessionCreated(Long sessionId, SmppServerSession session, BaseBindResp preparedBindResponse) throws SmppProcessingException { logger.info("Session created: {}", session); // need to do something it now (flag we're ready) // we need to create one session handler instance per session SmscSmppSessionHandler smppSessionHandler = new SmscSmppSessionHandler(session, config); session.serverReady(smppSessionHandler); sessionManager.addServerSession(session); }
synchronized (this) { if (logger.isInfoEnabled()) { logger.info(String.format("Session created: Name=%s SystemId=%s", session.getConfiguration().getName(), session.getConfiguration().getSystemId())); SmppSessionConfiguration sessionConfiguration = session.getConfiguration(); session.getConfiguration().getLoggingOptions().setLogBytes(false); session.getConfiguration().getLoggingOptions().setLogPdu(false); session.serverReady(smppSessionHandler);
logger.info(String.format("Session created: Name=%s SystemId=%s", session.getConfiguration().getName(), session.getConfiguration().getSystemId())); SmppSessionConfiguration sessionConfiguration = session.getConfiguration(); session.getConfiguration().getLoggingOptions().setLogBytes(false); session.getConfiguration().getLoggingOptions().setLogPdu(false); session.serverReady(smppSessionHandler);
public synchronized void addServerSession(SmppServerSession session) { if (session.getBindType() == SmppBindType.TRANSMITTER) { // we ignore transmitters as they can not be used to send delivers return; } String systemId = session.getConfiguration().getSystemId(); SessionList sessionList = applicationSessionMap.get(systemId); if (sessionList == null) { sessionList = new SessionList(); applicationSessionMap.put(systemId, sessionList); } sessionList.add(session); globalSessionList.add(session); }