public DefaultSmppSessionCounters() { this.txSubmitSM = new ConcurrentCommandCounter(); this.txDeliverSM = new ConcurrentCommandCounter(); this.txEnquireLink = new ConcurrentCommandCounter(); this.txDataSM = new ConcurrentCommandCounter(); this.rxSubmitSM = new ConcurrentCommandCounter(); this.rxDeliverSM = new ConcurrentCommandCounter(); this.rxEnquireLink = new ConcurrentCommandCounter(); this.rxDataSM = new ConcurrentCommandCounter(); }
switch (pdu.getCommandId()) { case SmppConstants.CMD_ID_SUBMIT_SM_RESP: this.counters.getTxSubmitSM().incrementResponseAndGet(); this.counters.getTxSubmitSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxSubmitSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxSubmitSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxSubmitSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DELIVER_SM_RESP: this.counters.getTxDeliverSM().incrementResponseAndGet(); this.counters.getTxDeliverSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxDeliverSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxDeliverSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxDeliverSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DATA_SM_RESP: this.counters.getTxDataSM().incrementResponseAndGet(); this.counters.getTxDataSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxDataSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxDataSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxDataSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_ENQUIRE_LINK_RESP: this.counters.getTxEnquireLink().incrementResponseAndGet(); this.counters.getTxEnquireLink().addRequestWaitTimeAndGet(waitTime); this.counters.getTxEnquireLink().addRequestResponseTimeAndGet(responseTime); this.counters.getTxEnquireLink().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxEnquireLink().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break;
StringBuilder to = new StringBuilder(); to.append("[request="); to.append(getRequest()); to.append(" expired="); to.append(getRequestExpired()); to.append(" response="); to.append(getResponse()); if (getResponse() > 0) { avgWaitTime = (double)getRequestWaitTime()/(double)getResponse(); if (getResponse() > 0) { avgResponseTime = (double)getRequestResponseTime()/(double)getResponse(); if (getResponse() > 0) { avgEstimatedProcessingTime = (double)getRequestEstimatedProcessingTime()/(double)getResponse();
this.counters.getRxSubmitSM().incrementResponseAndGet(); this.counters.getRxSubmitSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxSubmitSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DELIVER_SM_RESP: this.counters.getRxDeliverSM().incrementResponseAndGet(); this.counters.getRxDeliverSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxDeliverSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DATA_SM_RESP: this.counters.getRxDataSM().incrementResponseAndGet(); this.counters.getRxDataSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxDataSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_ENQUIRE_LINK_RESP: this.counters.getRxEnquireLink().incrementResponseAndGet(); this.counters.getRxEnquireLink().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxEnquireLink().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break;
public boolean checkLinkRecvMessage() { int currentEnqLinkCounter = this.defaultSmppSession.getCounters().getRxEnquireLink().getRequest(); int currentDlrRespCounter = this.defaultSmppSession.getCounters().getTxDeliverSM().getResponse(); int currentDataSmRespCounter = this.defaultSmppSession.getCounters().getTxDataSM().getResponse(); int currentSubmitSmRespCounter = this.defaultSmppSession.getCounters().getTxSubmitSM().getResponse(); if (this.rxEnquireLinkCounter < currentEnqLinkCounter || this.rxSubmitSmRespCount < currentSubmitSmRespCounter || this.rxDlrRespCounter < currentDlrRespCounter || this.rxDataSmRespCounter < currentDataSmRespCounter) { this.linkRecvMessCheck = true; } this.rxEnquireLinkCounter = currentEnqLinkCounter; this.rxDlrRespCounter = currentDlrRespCounter; this.rxDataSmRespCounter = currentDataSmRespCounter; this.rxSubmitSmRespCount = currentSubmitSmRespCounter; return this.linkRecvMessCheck; }
private void countSendResponsePduResponseTime(PduResponse pdu, long responseTime) { if (this.counters == null) { return; } if (!pdu.isResponse()) { return; } switch (pdu.getCommandId()) { case SmppConstants.CMD_ID_SUBMIT_SM_RESP: this.counters.getRxSubmitSM().addRequestResponseTimeAndGet(responseTime); break; case SmppConstants.CMD_ID_DELIVER_SM_RESP: this.counters.getRxDeliverSM().addRequestResponseTimeAndGet(responseTime); break; case SmppConstants.CMD_ID_DATA_SM_RESP: this.counters.getRxDataSM().addRequestResponseTimeAndGet(responseTime); break; case SmppConstants.CMD_ID_ENQUIRE_LINK_RESP: this.counters.getRxEnquireLink().addRequestResponseTimeAndGet(responseTime); break; } }
switch (pdu.getCommandId()) { case SmppConstants.CMD_ID_SUBMIT_SM_RESP: this.counters.getTxSubmitSM().incrementResponseAndGet(); this.counters.getTxSubmitSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxSubmitSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxSubmitSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxSubmitSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DELIVER_SM_RESP: this.counters.getTxDeliverSM().incrementResponseAndGet(); this.counters.getTxDeliverSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxDeliverSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxDeliverSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxDeliverSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DATA_SM_RESP: this.counters.getTxDataSM().incrementResponseAndGet(); this.counters.getTxDataSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxDataSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxDataSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxDataSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_ENQUIRE_LINK_RESP: this.counters.getTxEnquireLink().incrementResponseAndGet(); this.counters.getTxEnquireLink().addRequestWaitTimeAndGet(waitTime); this.counters.getTxEnquireLink().addRequestResponseTimeAndGet(responseTime); this.counters.getTxEnquireLink().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxEnquireLink().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break;
StringBuilder to = new StringBuilder(); to.append("[request="); to.append(getRequest()); to.append(" expired="); to.append(getRequestExpired()); to.append(" response="); to.append(getResponse()); if (getResponse() > 0) { avgWaitTime = (double)getRequestWaitTime()/(double)getResponse(); if (getResponse() > 0) { avgResponseTime = (double)getRequestResponseTime()/(double)getResponse(); if (getResponse() > 0) { avgEstimatedProcessingTime = (double)getRequestEstimatedProcessingTime()/(double)getResponse();
switch (pdu.getCommandId()) { case SmppConstants.CMD_ID_SUBMIT_SM_RESP: this.counters.getTxSubmitSM().incrementResponseAndGet(); this.counters.getTxSubmitSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxSubmitSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxSubmitSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxSubmitSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DELIVER_SM_RESP: this.counters.getTxDeliverSM().incrementResponseAndGet(); this.counters.getTxDeliverSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxDeliverSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxDeliverSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxDeliverSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DATA_SM_RESP: this.counters.getTxDataSM().incrementResponseAndGet(); this.counters.getTxDataSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxDataSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxDataSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxDataSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_ENQUIRE_LINK_RESP: this.counters.getTxEnquireLink().incrementResponseAndGet(); this.counters.getTxEnquireLink().addRequestWaitTimeAndGet(waitTime); this.counters.getTxEnquireLink().addRequestResponseTimeAndGet(responseTime); this.counters.getTxEnquireLink().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxEnquireLink().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break;
StringBuilder to = new StringBuilder(); to.append("[request="); to.append(getRequest()); to.append(" expired="); to.append(getRequestExpired()); to.append(" response="); to.append(getResponse()); if (getResponse() > 0) { avgWaitTime = (double) getRequestWaitTime() / (double) getResponse(); if (getResponse() > 0) { avgResponseTime = (double) getRequestResponseTime() / (double) getResponse(); if (getResponse() > 0) { avgEstimatedProcessingTime = (double) getRequestEstimatedProcessingTime() / (double) getResponse();
public DefaultSmppSessionCounters() { this.txSubmitSM = new ConcurrentCommandCounter(); this.txDeliverSM = new ConcurrentCommandCounter(); this.txEnquireLink = new ConcurrentCommandCounter(); this.txDataSM = new ConcurrentCommandCounter(); this.rxSubmitSM = new ConcurrentCommandCounter(); this.rxDeliverSM = new ConcurrentCommandCounter(); this.rxEnquireLink = new ConcurrentCommandCounter(); this.rxDataSM = new ConcurrentCommandCounter(); }
switch (pdu.getCommandId()) { case SmppConstants.CMD_ID_SUBMIT_SM_RESP: this.counters.getTxSubmitSM().incrementResponseAndGet(); this.counters.getTxSubmitSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxSubmitSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxSubmitSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxSubmitSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DELIVER_SM_RESP: this.counters.getTxDeliverSM().incrementResponseAndGet(); this.counters.getTxDeliverSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxDeliverSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxDeliverSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxDeliverSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DATA_SM_RESP: this.counters.getTxDataSM().incrementResponseAndGet(); this.counters.getTxDataSM().addRequestWaitTimeAndGet(waitTime); this.counters.getTxDataSM().addRequestResponseTimeAndGet(responseTime); this.counters.getTxDataSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxDataSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_ENQUIRE_LINK_RESP: this.counters.getTxEnquireLink().incrementResponseAndGet(); this.counters.getTxEnquireLink().addRequestWaitTimeAndGet(waitTime); this.counters.getTxEnquireLink().addRequestResponseTimeAndGet(responseTime); this.counters.getTxEnquireLink().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getTxEnquireLink().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break;
StringBuilder to = new StringBuilder(); to.append("[request="); to.append(getRequest()); to.append(" expired="); to.append(getRequestExpired()); to.append(" response="); to.append(getResponse()); if (getResponse() > 0) { avgWaitTime = (double)getRequestWaitTime()/(double)getResponse(); if (getResponse() > 0) { avgResponseTime = (double)getRequestResponseTime()/(double)getResponse(); if (getResponse() > 0) { avgEstimatedProcessingTime = (double)getRequestEstimatedProcessingTime()/(double)getResponse();
public DefaultSmppSessionCounters() { this.txSubmitSM = new ConcurrentCommandCounter(); this.txDeliverSM = new ConcurrentCommandCounter(); this.txEnquireLink = new ConcurrentCommandCounter(); this.txDataSM = new ConcurrentCommandCounter(); this.rxSubmitSM = new ConcurrentCommandCounter(); this.rxDeliverSM = new ConcurrentCommandCounter(); this.rxEnquireLink = new ConcurrentCommandCounter(); this.rxDataSM = new ConcurrentCommandCounter(); }
switch (pdu.getCommandId()) { case SmppConstants.CMD_ID_SUBMIT_SM_RESP: this.counters.getRxSubmitSM().incrementResponseAndGet(); this.counters.getRxSubmitSM().addRequestResponseTimeAndGet(responseTime); this.counters.getRxSubmitSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxSubmitSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DELIVER_SM_RESP: this.counters.getRxDeliverSM().incrementResponseAndGet(); this.counters.getRxDeliverSM().addRequestResponseTimeAndGet(responseTime); this.counters.getRxDeliverSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxDeliverSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DATA_SM_RESP: this.counters.getRxDataSM().incrementResponseAndGet(); this.counters.getRxDataSM().addRequestResponseTimeAndGet(responseTime); this.counters.getRxDataSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxDataSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_ENQUIRE_LINK_RESP: this.counters.getRxEnquireLink().incrementResponseAndGet(); this.counters.getRxEnquireLink().addRequestResponseTimeAndGet(responseTime); this.counters.getRxEnquireLink().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxEnquireLink().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break;
public DefaultSmppSessionCounters() { this.txSubmitSM = new ConcurrentCommandCounter(); this.txDeliverSM = new ConcurrentCommandCounter(); this.txEnquireLink = new ConcurrentCommandCounter(); this.txDataSM = new ConcurrentCommandCounter(); this.rxSubmitSM = new ConcurrentCommandCounter(); this.rxDeliverSM = new ConcurrentCommandCounter(); this.rxEnquireLink = new ConcurrentCommandCounter(); this.rxDataSM = new ConcurrentCommandCounter(); }
switch (pdu.getCommandId()) { case SmppConstants.CMD_ID_SUBMIT_SM_RESP: counters.getRxSubmitSM().incrementResponseAndGet(); counters.getRxSubmitSM().addRequestResponseTimeAndGet(responseTime); counters.getRxSubmitSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); counters.getRxSubmitSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DELIVER_SM_RESP: counters.getRxDeliverSM().incrementResponseAndGet(); counters.getRxDeliverSM().addRequestResponseTimeAndGet(responseTime); counters.getRxDeliverSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); counters.getRxDeliverSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DATA_SM_RESP: counters.getRxDataSM().incrementResponseAndGet(); counters.getRxDataSM().addRequestResponseTimeAndGet(responseTime); counters.getRxDataSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); counters.getRxDataSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_ENQUIRE_LINK_RESP: counters.getRxEnquireLink().incrementResponseAndGet(); counters.getRxEnquireLink().addRequestResponseTimeAndGet(responseTime); counters.getRxEnquireLink().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); counters.getRxEnquireLink().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break;
public ConcurrentCommandCounter createSnapshot() { return new ConcurrentCommandCounter(request.get(), requestExpired.get(), requestWaitTime.get(), requestResponseTime.get(), requestEstimatedProcessingTime.get(), response.get(), responseCommandStatusCounter); }
switch (pdu.getCommandId()) { case SmppConstants.CMD_ID_SUBMIT_SM_RESP: this.counters.getRxSubmitSM().incrementResponseAndGet(); this.counters.getRxSubmitSM().addRequestResponseTimeAndGet(responseTime); this.counters.getRxSubmitSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxSubmitSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DELIVER_SM_RESP: this.counters.getRxDeliverSM().incrementResponseAndGet(); this.counters.getRxDeliverSM().addRequestResponseTimeAndGet(responseTime); this.counters.getRxDeliverSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxDeliverSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_DATA_SM_RESP: this.counters.getRxDataSM().incrementResponseAndGet(); this.counters.getRxDataSM().addRequestResponseTimeAndGet(responseTime); this.counters.getRxDataSM().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxDataSM().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break; case SmppConstants.CMD_ID_ENQUIRE_LINK_RESP: this.counters.getRxEnquireLink().incrementResponseAndGet(); this.counters.getRxEnquireLink().addRequestResponseTimeAndGet(responseTime); this.counters.getRxEnquireLink().addRequestEstimatedProcessingTimeAndGet(estimatedProcessingTime); this.counters.getRxEnquireLink().getResponseCommandStatusCounter().incrementAndGet(pdu.getCommandStatus()); break;
public ConcurrentCommandCounter createSnapshot() { return new ConcurrentCommandCounter(request.get(), requestExpired.get(), requestWaitTime.get(), requestResponseTime.get(), requestEstimatedProcessingTime.get(), response.get(), responseCommandStatusCounter); }