javax.slee.Address.getAddressString()方法的使用及代码示例

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

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

Address.getAddressString介绍

暂无

代码示例

代码示例来源:origin: org.mobicents.core/mobicents-core-jar

public String toString() {
  return new StringBuffer().append("SleeEventImpl.toString() = { ").
  append("\n eventID = " + eventID).
  append("\n activitycontext  = " + activityContextId).
  append("\n eventObject = " + eventObject).
  append("\n address = " + ( address != null ? address.getAddressString() : null )).
  append("\n activity = " + activity).
  append("}").toString();
  
}

代码示例来源:origin: org.mobicents.examples/call-controller2-profile

public void verifyAddress(Address address)
    throws ProfileVerificationException {
  // Check address plan
  if (address.getAddressPlan() != AddressPlan.SIP)
    throw new ProfileVerificationException("Address \"" + address
        + "\" is not a SIP address");
  // Check URI scheme - must be sip: or sips:
  String uri = address.getAddressString().toLowerCase();
  if (!(uri.startsWith("sip:") || uri.startsWith("sips:")))
    throw new ProfileVerificationException("Address \"" + address
        + "\" is not a SIP address");
}

代码示例来源:origin: org.mobicents.examples/call-controller2-forwarding-sbb

/**
 * Attempt to find a Backup Address, but the method returns null if there
 * isn't any address to forward the INVITE.
 */
private Address getBackupAddress(String sipAddress) {
  Address backupAddress = null;
  CallControlProfileCMP profile = this.lookup(new javax.slee.Address(
      AddressPlan.SIP, sipAddress));
  if (profile != null) {
    javax.slee.Address address = profile.getBackupAddress();
    if (address != null) {
      try {
        backupAddress = getAddressFactory().createAddress(
            address.getAddressString());
      } catch (ParseException e) {
        log.error(e.getMessage(), e);
      }
    }
  }
  return backupAddress;
}

代码示例来源:origin: org.mobicents.examples/call-controller2-sbbs

/**
 * Attempt to find a list of Blocked Addresses (SIP URIs), but the method
 * returns null if the called user (sipAddress) does not block to any user.
 */
private ArrayList getBlockedArrayList(String sipAddress) {
  //sipAddress is AOR: sip:newbie@restcomm.com
  ArrayList uris = null;
  CallControlProfileCMP profile = super.lookup(new Address(AddressPlan.SIP,
      sipAddress));
  if (profile != null) {
    Address[] addresses = profile.getBlockedAddresses();
    if (addresses != null) {
      uris = new ArrayList(addresses.length);
      for (int i = 0; i < addresses.length; i++) {
        String address = addresses[i].getAddressString();
        try {
          SipURI uri = (SipURI) getAddressFactory().createURI(address);
          uris.add(uri);
        } catch (ParseException e) {
          log.severe(e.getMessage(), e);
        }
      }
    }
  }
  return uris;
}

代码示例来源:origin: org.mobicents.examples/call-controller2-sbbs

/**
 * Attempt to find a Backup Address, but the method returns null if there
 * isn't any address to forward the INVITE.
 */
private Address getBackupAddress(String sipAddress) {
  Address backupAddress = null;
  CallControlProfileCMP profile = this.lookup(new javax.slee.Address(AddressPlan.SIP, sipAddress));
  if (profile != null) {
    javax.slee.Address address = profile.getBackupAddress();
    if (address != null) {
      try {
        backupAddress = getAddressFactory().createAddress(address.getAddressString());
      } catch (ParseException e) {
        log.severe(e.getMessage(), e);
      }
    }
  }
  return backupAddress;
}

代码示例来源:origin: org.mobicents.core/mobicents-core-jar

if ( logger.isDebugEnabled() ) {
  logger.debug("profileName = " + profileName + " addressString = " 
      + selector.getAddress().getAddressString());

相关文章