Java Reference
In-Depth Information
L ISTING D.2 Continued
/**
* return the correspondednt service instance
*/
public Object lookup(String fullyQName) throws
javax.jnlp.UnavailableServiceException {
Object result = hash.get(fullyQName);
return result;
}
}
BasicServiceImpl
This service implementation provides only the Internet Explorer browser support on Windows
platforms. It is reported in Listing D.3. It can be invoked to bring up a Web browser window
pointing to a given URL.
L ISTING D.3 The Basic ServiceImpl Class
package com.marinilli.b2.ad.util;
import javax.jnlp.*;
import java.net.URL;
/**
* Appendix D - Implementation of the corresponding JNLP runtime service
*
* @author Mauro Marinilli
* @version 1.0
*/
public class BasicServiceImpl implements BasicService{
boolean isBrowserSupported = false;
String browser = “”;
D
/**
* This class supports only basic Windows platforms
* (MS IE only)
*
*/
public BasicServiceImpl() {
//detect browser
String os = System.getProperties().getProperty(“os.name”);
if (os.indexOf(“Windows”)!=-1) {
isBrowserSupported = true;
Search WWH ::




Custom Search