javax.servlet.sip.URI.getScheme()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(189)

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

URI.getScheme介绍

[英]Returns the scheme of this URI, for example "sip", "sips" or "tel".
[中]返回此URI的方案,例如“sip”、“sips”或“tel”。

代码示例

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-as7

public Object extract(Object input) {
    return ((URI) input).getScheme();
  }
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-as8

public Object extract(Object input) {
    return ((URI) input).getScheme();
  }
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-as10

public Object extract(Object input) {
    return ((URI) input).getScheme();
  }
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-catalina

public Object extract(Object input) {
    return ((URI) input).getScheme();
  }
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-as8

public Object extract(Object input) {
    URI uri = (URI) input;
    if (uri.isSipURI()) {
      return ((SipURI) uri).getParameter(param);
    } else if ("tel".equals(uri.getScheme())) {
      return ((TelURL) uri).getParameter(param);
    }
    return null;
  }
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-catalina

public Object extract(Object input) {
    URI uri = (URI) input;
    if (uri.isSipURI()) {
      return ((SipURI) uri).getParameter(param);
    } else if ("tel".equals(uri.getScheme())) {
      return ((TelURL) uri).getParameter(param);
    }
    return null;
  }
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-as10

public Object extract(Object input) {
    URI uri = (URI) input;
    if (uri.isSipURI()) {
      return ((SipURI) uri).getParameter(param);
    } else if ("tel".equals(uri.getScheme())) {
      return ((TelURL) uri).getParameter(param);
    }
    return null;
  }
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-as7

public Object extract(Object input) {
    URI uri = (URI) input;
    if (uri.isSipURI()) {
      return ((SipURI) uri).getParameter(param);
    } else if ("tel".equals(uri.getScheme())) {
      return ((TelURL) uri).getParameter(param);
    }
    return null;
  }
}

代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl

public List<ProxyBranch> createProxyBranches(List<? extends URI> targets) {
  ArrayList<ProxyBranch> list = new ArrayList<ProxyBranch>();
  for(URI target: targets)
  {
    if(target == null) {
      throw new NullPointerException("URI can't be null");
    }
    if(!JainSipUtils.checkScheme(target.toString())) {
      throw new IllegalArgumentException("Scheme " + target.getScheme() + " is not supported");
    }
    ProxyBranchImpl branch = new ProxyBranchImpl(target, this);
    branch.setRecordRoute(recordRoutingEnabled);
    branch.setRecurse(recurse);
    list.add(branch);
    this.proxyBranches.put(target, branch);
  }
  return list;
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-as8

public Object extract(Object input) {
  URI uri = (URI) input;
  if (uri.isSipURI()) {
    SipURI sipuri = (SipURI) uri;
    if ("phone".equals(sipuri.getParameter("user"))) {
      return stripVisuals(sipuri.getUser());
    }
  } else if ("tel".equals(uri.getScheme())) {
    return stripVisuals(((TelURL) uri).getPhoneNumber());
  }
  return null;
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-as10

public Object extract(Object input) {
  URI uri = (URI) input;
  if (uri.isSipURI()) {
    SipURI sipuri = (SipURI) uri;
    if ("phone".equals(sipuri.getParameter("user"))) {
      return stripVisuals(sipuri.getUser());
    }
  } else if ("tel".equals(uri.getScheme())) {
    return stripVisuals(((TelURL) uri).getPhoneNumber());
  }
  return null;
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-catalina

public Object extract(Object input) {
  URI uri = (URI) input;
  if (uri.isSipURI()) {
    SipURI sipuri = (SipURI) uri;
    if ("phone".equals(sipuri.getParameter("user"))) {
      return stripVisuals(sipuri.getUser()); 	
    }            
  } else if ("tel".equals(uri.getScheme())) {
    return stripVisuals(((TelURL) uri).getPhoneNumber());
  }
  return null;
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-as7

public Object extract(Object input) {
  URI uri = (URI) input;
  if (uri.isSipURI()) {
    SipURI sipuri = (SipURI) uri;
    if ("phone".equals(sipuri.getParameter("user"))) {
      return stripVisuals(sipuri.getUser()); 	
    }            
  } else if ("tel".equals(uri.getScheme())) {
    return stripVisuals(((TelURL) uri).getPhoneNumber());
  }
  return null;
}

代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl

public void proxyTo(final List<? extends URI> uris) {
  for (URI uri : uris)
  {
    if(uri == null) {
      throw new NullPointerException("URI can't be null");
    }
    if(!JainSipUtils.checkScheme(uri.toString())) {
      throw new IllegalArgumentException("Scheme " + uri.getScheme() + " is not supported");
    }
    final ProxyBranchImpl branch = new ProxyBranchImpl((URI) uri, this);
    branch.setRecordRoute(recordRoutingEnabled);
    branch.setRecurse(recurse);
    this.proxyBranches.put(uri, branch);
  }
  startProxy();
}

代码示例来源:origin: org.mobicents.servlet.sip/sip-servlets-impl

public void proxyTo(final URI uri) {
  if(uri == null) {
    throw new NullPointerException("URI can't be null");
  }
  if(!JainSipUtils.checkScheme(uri.toString())) {
    // Fix for Issue http://code.google.com/p/mobicents/issues/detail?id=2327, checking the route header
    RouteHeader routeHeader = (RouteHeader) originalRequest.getMessage().getHeader(RouteHeader.NAME);
    if(routeHeader == null || (routeHeader != null && !JainSipUtils.checkScheme(routeHeader.getAddress().getURI().toString()))) {
      throw new IllegalArgumentException("Scheme " + uri.getScheme() + " is not supported");
    }            
  }
  final ProxyBranchImpl branch = new ProxyBranchImpl(uri, this);
  branch.setRecordRoute(recordRoutingEnabled);
  branch.setRecurse(recurse);
  this.proxyBranches.put(uri, branch);
  startProxy();
}

相关文章