use of org.mobicents.smsc.tools.smppsimulator.SmppSimulatorParameters.EncodingType in project smscgateway by RestComm.
the class SmppTestingForm method doSendSmppMessages.
private void doSendSmppMessages() {
Random rand = new Random();
for (int i1 = 0; i1 < this.param.getBulkMessagePerSecond() / threadCount; i1++) {
int n = this.param.getBulkDestAddressRangeEnd() - this.param.getBulkDestAddressRangeStart() + 1;
if (n < 1)
n = 1;
int j1 = rand.nextInt(n);
Integer destAddr = this.param.getBulkDestAddressRangeStart() + j1;
String destAddrS = destAddr.toString();
int j2 = rand.nextInt(2);
int j3 = rand.nextInt(3);
EncodingType encodingType;
if (j2 == 0)
encodingType = EncodingType.GSM7_DCS_0;
else
encodingType = EncodingType.UCS2_DCS_8;
SplittingType splittingType;
switch(j3) {
case 0:
splittingType = SplittingType.DoNotSplit;
break;
case 1:
splittingType = SplittingType.SplitWithParameters_DefaultSegmentLength;
break;
default:
splittingType = SplittingType.SplitWithUdh_DefaultSegmentLength;
break;
}
int j4 = rand.nextInt(5);
String msg = this.param.getMessageText();
if (j4 == 0)
msg = bigMessage;
msg += " " + ((Integer) messagesNum.incrementAndGet()).toString();
this.submitMessage(encodingType, 0, msg, splittingType, param.getValidityType(), destAddrS, param.getMessagingMode(), param.getSpecifiedSegmentLength());
}
}
Aggregations