热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

javax.sip.address.AddressFactory.createURI()方法的使用及代码示例

本文整理了Java中javax.sip.address.AddressFactory.createURI()方法的一些代码示例,展示了AddressFact

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

AddressFactory.createURI介绍

暂无

代码示例

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

public void setValue(String value) {
try {
this.uri = SipFactoryImpl.addressFactory.createURI(value);
} catch (ParseException ex) {
logger.error("Bad input arg", ex);
throw new IllegalArgumentException("Bad input arg", ex);
}
}

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

public void setValue(String value) {
try {
this.uri = SipFactoryImpl.addressFactory.createURI(value);
if(this.uri instanceof Parameters) {
super.setParameters(AddressImpl.getParameters((Parameters)uri));
} else {
super.setParameters(new ConcurrentHashMap());
}
} catch (ParseException ex) {
logger.error("Bad input arg", ex);
throw new IllegalArgumentException("Bad input arg", ex);
}
}

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

public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
try {
calleeCSeq = in.readLong();
callerCSeq = in.readLong();
calleeCOntact= SipFactoryImpl.addressFactory.createURI(in.readUTF());
callerCOntact= SipFactoryImpl.addressFactory.createURI(in.readUTF());
int routeSetSize = in.readInt();
for (int i = 0; i javax.sip.address.Address route = SipFactoryImpl.addressFactory.createAddress(in.readUTF());
callerRouteSet.add(route);
}
routeSetSize = in.readInt();
for (int i = 0; i javax.sip.address.Address route = SipFactoryImpl.addressFactory.createAddress(in.readUTF());
calleeRouteSet.add(route);
}
javax.sip.address.Address toAddress = SipFactoryImpl.addressFactory.createAddress(in.readUTF());
toHeader = (To) SipFactoryImpl.headerFactory.createToHeader(toAddress, in.readUTF());
javax.sip.address.Address fromAddress = SipFactoryImpl.addressFactory.createAddress(in.readUTF());
fromHeader = (From) SipFactoryImpl.headerFactory.createFromHeader(fromAddress, in.readUTF());
callId = in.readUTF();
} catch (ParseException e) {
throw new IllegalArgumentException("Problem occurred while unserializing ProxyTerminationInfo", e);
}
}
/*

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

public static MobicentsExtendedListeningPoint findListeningPoint(
SipNetworkInterfaceManager sipNetworkInterfaceManager,
Request request, String outboundInterface) {

MobicentsExtendedListeningPoint listeningPoint;

if(outboundInterface == null) {
String transport = findTransport(request);
listeningPoint = sipNetworkInterfaceManager.findMatchingListeningPoint(transport, false);
} else {
javax.sip.address.SipURI outboundInterfaceURI = null;
try {
outboundInterfaceURI = (javax.sip.address.SipURI) SipFactoryImpl.addressFactory.createURI(outboundInterface);
} catch (ParseException e) {
throw new IllegalArgumentException("couldn't parse the outbound interface " + outboundInterface, e);
}
listeningPoint = sipNetworkInterfaceManager.findMatchingListeningPoint(outboundInterfaceURI, false);
}
return listeningPoint;
}

代码示例来源: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 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.servlet.sip/sip-servlets-impl

public URI createURI(String uri) throws ServletParseException {
// if(!checkScheme(uri)) {
// // testCreateProxyBranches101 needs this to be IllegalArgumentExcpetion, but the test is wrong
// throw new ServletParseException("The uri " + uri + " is not valid");
// }
try {
javax.sip.address.URI jainUri = SipFactoryImpl.addressFactory
.createURI(uri);
if (jainUri instanceof javax.sip.address.SipURI) {
return new SipURIImpl(
(javax.sip.address.SipURI) jainUri, ModifiableRule.Modifiable);
} else if (jainUri instanceof javax.sip.address.TelURL) {
return new TelURLImpl(
(javax.sip.address.TelURL) jainUri);
} else {
return new GenericURIImpl(jainUri);
}
} catch (ParseException ex) {
throw new ServletParseException("Bad param " + uri, ex);
}
}

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

javax.sip.address.SipURI outboundInterfaceURI = (javax.sip.address.SipURI) SipFactoryImpl.addressFactory.createURI(outboundInterface);
host = outboundInterfaceURI.getHost();
} else {

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

javax.sip.address.SipURI outboundInterfaceURI = (javax.sip.address.SipURI) SipFactoryImpl.addressFactory.createURI(session.getOutboundInterface());
lp = sipNetworkInterfaceManager.findMatchingListeningPoint(outboundInterfaceURI, false);
} else {

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

/**
* @param proxyBranch
* @param request
* @param proxy
* @param poppedURI
*/
private static void addRecordRouteHeader(
Request request, SipFactoryImpl sipFactoryImpl,
javax.sip.address.SipURI poppedURI) {
try {
SipURI recordRouteURI = (SipURI)((RecordRouteHeader)request.getHeader(RecordRouteHeader.NAME)).getAddress().getURI();
javax.sip.address.SipURI newRecordRouteURI = (javax.sip.address.SipURI)
sipFactoryImpl.getAddressFactory().createURI(recordRouteURI.toString());
newRecordRouteURI.removeParameter(MessageDispatcher.SIP_OUTBOUND_PARAM_OB);
newRecordRouteURI.setUser(poppedURI.getUser());
RecordRouteHeader recordRouteHeader = sipFactoryImpl.getHeaderFactory().createRecordRouteHeader(
sipFactoryImpl.getAddressFactory().createAddress(newRecordRouteURI));
// removes the header created when the request was cloned
request.removeFirst(RecordRouteHeader.NAME);
request.addFirst(recordRouteHeader);
} catch (ParseException e) {
logger.error("Impossible to parse the following popped URI " + poppedURI, e);
} catch (SipException e) {
logger.error("Impossible to add the following recordRouteHeader ", e);
}
}

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

javax.sip.address.SipURI outboundInterfaceURI = (javax.sip.address.SipURI) SipFactoryImpl.addressFactory.createURI(outboundInterface);
ipAddressToCheckAgainst = ((gov.nist.javax.sip.address.SipUri)outboundInterfaceURI).getHost();

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

outboundInterfaceURI = (javax.sip.address.SipURI) SipFactoryImpl.addressFactory.createURI(outboundInterface);
} catch (ParseException e) {
throw new IllegalArgumentException("couldn't parse the outbound interface " + outboundInterface, e);

代码示例来源:origin: org.mobicents.servers.diameter.examples/openims-example-sbb

URI uri = sipProvider.getAddressFactory().createURI(toAddressString);
Request req = sipMessageFactory.createRequest(uri, Request.MESSAGE, this.sipProvider.getNewCallId(),
sipHeaderFactory.createCSeqHeader(1L, Request.MESSAGE), fromHeader, toHeader, viaHeaders, maxForwards);

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

logger.debug("Routing the request externally " + sipServletRequest );
request.setRequestURI(SipFactoryImpl.addressFactory.createURI(routes[0]));
try {
forwardRequestStatefully(sipServletRequest, null, sipRouteModifier);

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

javax.sip.address.SipURI outboundInterfaceURI = (javax.sip.address.SipURI) SipFactoryImpl.addressFactory.createURI(outboundInterface);
String outboundHost = ((gov.nist.javax.sip.address.SipUri)outboundInterfaceURI).getHost();
contactSipUri.setHost(outboundHost);

代码示例来源:origin: org.mobicents.examples/sip-wake-up-sbb

try {
URI requestURI = addressFactory.createURI(registration
.getContactAddress());

推荐阅读
  • 本文介绍了在iOS开发中使用UITextField实现字符限制的方法,包括利用代理方法和使用BNTextField-Limit库的实现策略。通过这些方法,开发者可以方便地限制UITextField的字符个数和输入规则。 ... [详细]
  • 如何自行分析定位SAP BSP错误
    The“BSPtag”Imentionedintheblogtitlemeansforexamplethetagchtmlb:configCelleratorbelowwhichi ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • 标题: ... [详细]
  • 本文介绍了Python爬虫技术基础篇面向对象高级编程(中)中的多重继承概念。通过继承,子类可以扩展父类的功能。文章以动物类层次的设计为例,讨论了按照不同分类方式设计类层次的复杂性和多重继承的优势。最后给出了哺乳动物和鸟类的设计示例,以及能跑、能飞、宠物类和非宠物类的增加对类数量的影响。 ... [详细]
  • Imtryingtofigureoutawaytogeneratetorrentfilesfromabucket,usingtheAWSSDKforGo.我正 ... [详细]
  • 预备知识可参考我整理的博客Windows编程之线程:https:www.cnblogs.comZhuSenlinp16662075.htmlWindows编程之线程同步:https ... [详细]
  • 本文介绍了在处理不规则数据时如何使用Python自动提取文本中的时间日期,包括使用dateutil.parser模块统一日期字符串格式和使用datefinder模块提取日期。同时,还介绍了一段使用正则表达式的代码,可以支持中文日期和一些特殊的时间识别,例如'2012年12月12日'、'3小时前'、'在2012/12/13哈哈'等。 ... [详细]
  • 使用圣杯布局模式实现网站首页的内容布局
    本文介绍了使用圣杯布局模式实现网站首页的内容布局的方法,包括HTML部分代码和实例。同时还提供了公司新闻、最新产品、关于我们、联系我们等页面的布局示例。商品展示区包括了车里子和农家生态土鸡蛋等产品的价格信息。 ... [详细]
  • 本文分析了Wince程序内存和存储内存的分布及作用。Wince内存包括系统内存、对象存储和程序内存,其中系统内存占用了一部分SDRAM,而剩下的30M为程序内存和存储内存。对象存储是嵌入式wince操作系统中的一个新概念,常用于消费电子设备中。此外,文章还介绍了主电源和后备电池在操作系统中的作用。 ... [详细]
  • Netty源代码分析服务器端启动ServerBootstrap初始化
    本文主要分析了Netty源代码中服务器端启动的过程,包括ServerBootstrap的初始化和相关参数的设置。通过分析NioEventLoopGroup、NioServerSocketChannel、ChannelOption.SO_BACKLOG等关键组件和选项的作用,深入理解Netty服务器端的启动过程。同时,还介绍了LoggingHandler的作用和使用方法,帮助读者更好地理解Netty源代码。 ... [详细]
  • 本文介绍了GTK+中的GObject对象系统,该系统是基于GLib和C语言完成的面向对象的框架,提供了灵活、可扩展且易于映射到其他语言的特性。其中最重要的是GType,它是GLib运行时类型认证和管理系统的基础,通过注册和管理基本数据类型、用户定义对象和界面类型来实现对象的继承。文章详细解释了GObject系统中对象的三个部分:唯一的ID标识、类结构和实例结构。 ... [详细]
  • Python语法上的区别及注意事项
    本文介绍了Python2x和Python3x在语法上的区别,包括print语句的变化、除法运算结果的不同、raw_input函数的替代、class写法的变化等。同时还介绍了Python脚本的解释程序的指定方法,以及在不同版本的Python中如何执行脚本。对于想要学习Python的人来说,本文提供了一些注意事项和技巧。 ... [详细]
  • springmvc学习笔记(十):控制器业务方法中通过注解实现封装Javabean接收表单提交的数据
    本文介绍了在springmvc学习笔记系列的第十篇中,控制器的业务方法中如何通过注解实现封装Javabean来接收表单提交的数据。同时还讨论了当有多个注册表单且字段完全相同时,如何将其交给同一个控制器处理。 ... [详细]
author-avatar
頃刻想詤嗳伱kYU-2001
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有