Java Reference
In-Depth Information
In this chapter, we will examine the runtime services offered by a JNLP Client to its launched
applications.
Introduction
To compile the code in this chapter, you need to add the javax.jnlp library (released from
Sun) in your classpath. It is freely available through the Java Developer Connection or more
quickly from the Java Web Start product page at http://www.javasoft.com/products/
javaWebstart .
The services offered by the JNLP Client to launched applications are always invoked by
obtaining a service object from the javax.jnlp.ServiceManager class (as shown in the fol-
lowing code):
service =
(ExtensionInstallerService)ServiceManager.lookup(“javax.jnlp.ExtensionInstaller
Service”);
Once obtained, the particular service object clients can use it as needed. We won't discuss the
API details here (have a look at Appendix B, “The JNLP Specification,” or at the jnlp package
documentation); instead, we will give practical code that is useful in real-world situations.
Figure 11.1 depicts a UML class diagram showing the javax.jnlp package classes.
ServiceManager
implements
concretely
throws
creates
services
UnavailableService
Exception
ServiceManagerStub
Object
BasicService
ClipboardService
DownloadService
DownloadService
Listener
FileOpenService
ExtensionInstallerService
FileSaveService
PersistenceService
FileContents
JNLPRandomAccesFile
F IGURE 11.1
The class diagram for the JNLP classes.
Search WWH ::




Custom Search