Java Reference
In-Depth Information
In Listing 7.10, the ClientDeploylet applet is reported. This class is the base class for all
client-side applications that use the deploylet framework.
L ISTING 7.10 The ClientDeploylet Class
package com.marinilli.b2.c7.deploylet;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import java.rmi.*;
import java.io.*;
/**
* Chapter 7 - ClientDeploylet
*
* The client-side of the Deploylet interface .
*
* @author Mauro Marinilli
* @version 1.0
*/
public abstract class ClientDeploylet extends JApplet implements Deploylet {
private Deploylet server;
//
// Applet methods
//
/**Construct the applet*/
public ClientDeploylet() {
}
/**Initialize the applet*/
public final void init() {
//
try {
String serverName = getParameter(“name”);
server = (Deploylet) Naming.lookup(serverName);
System.out.println(“Deploylet-server=”+server.getServer());
log(“*** logged: “ + getClass().getName() + “\nwith ServerDeploylet:
“ + serverName);
log(“init()”);
initApplication();
} catch (Exception e) {
System.out.println(“ClientDeploylet during ServerDeploylet lookup: “+e);
}
}
Search WWH ::




Custom Search