Developer’s Guide SoundPoint IP / SoundStation IP

3.Write an application that is going to retrieve the stock information from a data service provider.

For this example, this application will be retrieving stock information from Yahoo and will send it to the Microbrowser. This application is written using a Java Server Page (JSP).

<?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <%@page import="java.io.File,java.io.IOException,java.net.URL,java.awt.image.B ufferedImage,javax.imageio.ImageIO"%>

<html>

<head>

<title>Stock Quote</title> </head>

<body>

<%

// GETTING THE PATH WHERE BMP FILE HAS TO BE SAVED

String bmpFilePath = application.getRealPath(File.separator) + "quote.bmp";

//DEFINE URL FROM WHERE CONTENT TO BE RETRIEVED String stockUrl = "http://ichart.yahoo.com/t?s=";

//RETRIEVE THE STOCK SYMBOL FROM REQUEST

String stockSymbol = "PLCM"; // DEFAULT TO PLCM if ( request.getParameter("stockname") != null ) { stockSymbol = request.getParameter("stockname");

}

readAndConvertContentToBmp(stockUrl + stockSymbol, bmpFilePath, stockSymbol);

%>

<%!

//READ THE CONTENT FROM GIVEN URL AND THEN CONVERT THE CONTENT TO A BMP FILE

private void readAndConvertContentToBmp(String a_stockUrl, String a_filePath, String a_name) throws IOException {

try {

BufferedImage stockImage = ImageIO.read(new URL(a_stockUrl)); ImageIO.write(stockImage, "bmp", new File(a_filePath));

}

catch (IOException ex) { throw ex;}

}

%>

<!-- START DISPLAY BMP FILE --> <img src="quote.bmp"/>

<!-- END DISPLAY BMP FILE --> </body>

</html>

2 - 40

Page 52
Image 52
Polycom SIP 3.1 manual Getting the Path Where BMP File has to be Saved

SIP 3.1 specifications

Polycom SIP 3.1 is an advanced session initiation protocol designed to enhance voice and video communication in various business environments. As a pivotal component of Polycom’s telecommunication solutions, SIP 3.1 offers several features and characteristics that cater to the evolving needs of modern enterprises, particularly those that rely on seamless and efficient communication.

One of the standout features of Polycom SIP 3.1 is its robust interoperability. This protocol supports a wide range of endpoints and platforms, allowing organizations to integrate their existing systems with new technologies effortlessly. This flexibility ensures that businesses can leverage their previous investments while upgrading to the latest communication tools.

Another key aspect of Polycom SIP 3.1 is its enhanced call management capabilities. The protocol facilitates efficient call handling, enabling users to manage multiple calls seamlessly. Features like call hold, transfer, and conferencing are streamlined, which enhances productivity by allowing for efficient collaboration among team members. Additionally, it is optimized for low latency and high-quality audio, ensuring that conversations are clear and free from disruptions.

Security is paramount in today’s digital landscape, and Polycom SIP 3.1 addresses this concern with advanced encryption standards. By integrating security features such as Transport Layer Security (TLS) and Secure Real-time Transport Protocol (SRTP), it protects sensitive communication from unauthorized access and ensures that data remains confidential throughout the call.

Polycom SIP 3.1 also boasts compatibility with various video codecs, making it a versatile choice for video conferencing. This compatibility ensures high-quality video streams, which is essential for effective visual communication in remote meetings. Furthermore, the support for the H.264 codec provides efficient bandwidth usage, making high-definition video conferencing accessible, even in varying network conditions.

Moreover, the protocol provides strong support for presence and instant messaging, which enhances real-time communication among users. This integration of voice, video, and messaging capabilities fosters a more connected and collaborative work environment, allowing teams to engage effectively regardless of their geographical locations.

In summary, Polycom SIP 3.1 stands out as a sophisticated solution tailored to meet the demands of modern business communication. With its emphasis on interoperability, call management, security, video quality, and real-time collaboration, it caters to companies of all sizes seeking to optimize their communication infrastructure and enhance productivity in the workplace. As businesses continue to navigate the complexities of digital communication, Polycom SIP 3.1 remains a compelling choice in the market.