com.cloudhopper.smpp.type.Address.getNpi()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中com.cloudhopper.smpp.type.Address.getNpi()方法的一些代码示例,展示了Address.getNpi()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.getNpi()方法的具体详情如下:
包路径:com.cloudhopper.smpp.type.Address
类名称:Address
方法名:getNpi

Address.getNpi介绍

暂无

代码示例

代码示例来源:origin: org.mobicents.smsc/smpp

public boolean isSourceAddressMatching(Address sourceAddress) {
  // Check sourceTon
  if (this.sourceTon != -1 && this.sourceTon != sourceAddress.getTon()) {
    return false;
  }
  // Check sourceNpi
  if (this.sourceNpi != -1 && this.sourceNpi != sourceAddress.getNpi()) {
    return false;
  }
  // Check sourceAddress
  Matcher m = this.sourceAddressRangePattern.matcher(sourceAddress.getAddress());
  if (m.matches()) {
    return true;
  }
  return false;
}

代码示例来源:origin: org.restcomm.smpp/smpp-extensions

public boolean isSourceAddressMatching(Address sourceAddress) {
  // Check sourceTon
  if (this.sourceTon != -1 && this.sourceTon != sourceAddress.getTon()) {
    return false;
  }
  // Check sourceNpi
  if (this.sourceNpi != -1 && this.sourceNpi != sourceAddress.getNpi()) {
    return false;
  }
  // Check sourceAddress
  Matcher m = this.sourceAddressRangePattern.matcher(sourceAddress.getAddress());
  if (m.matches()) {
    return true;
  }
  return false;
}

代码示例来源:origin: org.mobicents.smsc/smpp

if (esme.getEsmeNpi() != -1 && esme.getEsmeNpi() != bindRequestAddressRange.getNpi()) {
  logger.error(String.format("Received BIND request with NPI=%d but configured NPI=%d",
      bindRequestAddressRange.getNpi(), esme.getEsmeNpi()));
  throw new SmppProcessingException(SmppConstants.STATUS_INVBNDSTS);

代码示例来源:origin: org.restcomm.smpp/smpp-extensions

if (esme.getEsmeNpi() != -1 && esme.getEsmeNpi() != bindRequestAddressRange.getNpi()) {
  logger.error(String.format("Received BIND request with NPI=%d but configured NPI=%d",
      bindRequestAddressRange.getNpi(), esme.getEsmeNpi()));
  throw new SmppProcessingException(SmppConstants.STATUS_INVBNDSTS);

代码示例来源:origin: org.mobicents.smsc/smpp-server-ra-ra

tracer.warning(String
    .format("Incoming SUBMIT_SM's sequence_number=%d source_addr_ton=%d source_addr_npi=%d source_addr=%s doesn't match with configured ESME name=%s source_addr_ton=%d source_addr_npi=%d source_addr=%s",
        submitSm.getSequenceNumber(), sourceAddress.getTon(), sourceAddress.getNpi(),
        sourceAddress.getAddress(), this.esme.getName(), this.esme.getSourceTon(),
        this.esme.getSourceNpi(), this.esme.getSourceAddressRange()));
tracer.warning(String
    .format("Incoming DATA_SM's sequence_number=%d source_addr_ton=%d source_addr_npi=%d source_addr=%s doesn't match with configured ESME name=%s source_addr_ton=%d source_addr_npi=%d source_addr=%s",
        dataSm.getSequenceNumber(), sourceAddress.getTon(), sourceAddress.getNpi(),
        sourceAddress.getAddress(), this.esme.getName(), this.esme.getSourceTon(),
        this.esme.getSourceNpi(), this.esme.getSourceAddressRange()));
tracer.warning(String
    .format("Incoming DELIVER_SM's sequence_number=%d source_addr_ton=%d source_addr_npi=%d source_addr=%s doesn't match with configured ESME name=%s source_addr_ton=%d source_addr_npi=%d source_addr=%s",
        deliverSm.getSequenceNumber(), sourceAddress.getTon(), sourceAddress.getNpi(),
        sourceAddress.getAddress(), this.esme.getName(), this.esme.getSourceTon(),
        this.esme.getSourceNpi(), this.esme.getSourceAddressRange()));
tracer.warning(String
    .format("Incoming SUBMIT_MULTI's sequence_number=%d source_addr_ton=%d source_addr_npi=%d source_addr=%s doesn't match with configured ESME name=%s source_addr_ton=%d source_addr_npi=%d source_addr=%s",
        submitMulti.getSequenceNumber(), sourceAddress.getTon(), sourceAddress.getNpi(),
        sourceAddress.getAddress(), this.esme.getName(), this.esme.getSourceTon(),
        this.esme.getSourceNpi(), this.esme.getSourceAddressRange()));

相关文章