JSR 289中增加了两个新的类:
(1)public interface ConvergedHttpSession extends javax.servlet.http.HttpSession
这个类提供了访问与HttpSession相关的功能实体的方法,这种情况只发生在聚合的HTTP/SIP容器中。在聚合容器中,HttpSession的实例将被转换成ConvergedHttpSession
类型。
定义的方法如下:
SipApplicationSession getApplicationSession():如果SipApplicationSession存在,则返回;如果不存在,则创建一个新的应用会话,并且在与converged http session关联之后返回。
java.lang.String encodeURL(java.lang.String url):这个方法将HTTP URL与jsessionid进行编码,";jsessionid=http-session-id"。返回编码之后的URL。
java.lang.String encodeURL(java.lang.String relativePath, java.lang.String scheme):将给定的相对路径转化为一个绝对URL,通过附加给定的协议类型(http或https)、当前ServletContext的contextPath和host:port,并将得到的URL与jsessionid进行编码,返回编码后的URL。
(2)public interface SipSessionsUtil
一个实用工具类,为聚合的HTTP/SIP应用和聚合的Java EE/SIP应用提供支持。这个类可通过ServletContext参数javax.servlet.sip.SipSessionsUtil或插入@Resource注解来访问。定义的方法如下:
SipApplicationSession getApplicationSessionById(java.lang.String applicationSessionId):对于给定的applicationSessionId返回相应的SipApplicationSession。参数applicationSessionId字符串与SipApplicationSession.getId()返回值类型相同。只有应用会话属于触发这个方法的应用时,应用会话才会被返回。
SipApplicationSession getApplicationSessionByKey(java.lang.String applicationSessionKey, boolean create):对于给定的applicationSessionKey返回相应的SipApplicationSession。参数applicationSessionKey字符串与SipFactory#createApplicationSessionByKey所用参数类型相同。只有应用会话属于触发这个方法的应用时,应用会话才会被返回。
SipSession getCorrespondingSipSession(SipSession session, java.lang.String headerName):返回相关的SipSession。适用于RFC 3911定义的会话加入(session joining)和RFC 3891定义的会话替换(session replacement)。
此外,还有一些机制用以支持Converged Application。
Encoding URLs:这一机制使得应用将HTTP URL与SipApplicationSession id一起进行编码。编码之后的URL通过某种机制发送给外部的UA。当带有这一URL的HTTP请求返回给聚合容器时,容器必须将这一新的HttpSession与编码的SipApplicationSession进行关联。这一机制类似于encodeURI()作用于SIP session。
从协议会话到应用会话:在一个聚合应用中,经常需要从SIP session或者HTTP Session访问SipApplicationSession。SipSession有一个方法getApplicationSession()来解决此问题;对于HTTP session来讲,则需要使用javax.servlet.sip.ConvergedHttpSession接口来访问,此接口提供了一些有用的方法。
分享到:
相关推荐
The present document is structured in the same manner as TS 181 005 [3] and the main clause numbering from this point in the document onwards therefore follows that document, with the scope of those ...
藏经阁-How Spark is Enabling the New Wave of Converged Applications
This test document specifies test methodologies and performance criteria for the RF performance evaluation of WiFi mobile converged devices. The scope of testing includes Handheld, self-contained Wi-...
Deployment of survivable fiber-wireless access for converged optical and data center networks
The CPwE solution is designed for industrial Ethernet applications. Although CPwE is applicable to multiple industries, this Design and Implementation Guide (DIG) focuses on the manufacturing ...
A novel architecture of converged radio-over-fiber (RoF) and wavelength division multiplexed passive optical network (WDM-PON) system, namely RoF-WDM-PON, is demonstrated. 20-GHz 1-Gb/s radio ...
FreeSWITCH is an open source carrier-grade telephony platform designed to facilitate the creation of voice, chat, and video applications, via phones and web browsers. It is scalable, carrier-ready, ...
The energy efficiency of 5G green cellular networks with average and water-filling power allocation schemes is studied in this paper. Based on the proposed interference and achievable rate model, an ...
single-layer transmission-type metasurfaces are proposed to generate a converged vortex beam and vortex beams with different topological charges. A new metasurface design is used to generate the ...
IT Convergence and Security 2017 Volume 1 英文无水印原版pdf pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 ...
It is scalable, carrier-ready, and easy-to-program for converged communication and VoIP. The technology serves SIP, WebRTC, PSTN, FAX, PBX, VERTO, and all the relevant channels essential to stay ...
Oracle® Communications Converged Application Server Developing SIP Applications Release 4.0
Converged and cloud storage services (IaaS, PaaS, SaaS) Data protection for virtual, cloud, and physical environments Data footprint reduction and data protection modernization High availability, ...
Lenovo Converged HX Series Quick Start Guide
The goal of building systems that can adapt to their environments and learn ...puter science, engineering, mathematics, physics, neuroscience, and cognitive ...quality research and innovative applications.
A host of factors have converged to produce the latest revolution in computer and communications networking: Image Demand: Enterprises are faced with a surge of demands that focus their attention on ...
IP communications titles from Cisco Press help networking professionals understand voice and IP telephony technologies, plan and design converged networks, and implement network solutions for ...
Converged HX Series Competitive-All.pdf
abaqus Abaqus收敛培训教材Obtaining a Converged Solution with AbaqusC 2021 pdf