SSLHelloAppletpublic class SSLHelloApplet extends Applet Copyright (c) 1996, 1997, 1998,1999 Phaos Technology Corp. All
rights reserved. |
Fields Summary |
---|
String | message | Hello | obj |
Methods Summary |
---|
public void | init()
try {
// Load the client socket factory from the applet host.
// contact a secure rmi registry.
Registry registry = java.rmi.registry.LocateRegistry.
getRegistry(getCodeBase().getHost(), 1099,
new SSLClientSocketFactory());
/* obtain a remote reference to the secure server using
* jrmp over SSL.
*/
obj = (Hello) registry.lookup("/HelloServer");
// invoke a secure remote method
message = obj.sayHello();
} catch (Exception e) {
System.out.println("HelloApplet exception: " +
e.getMessage());
e.printStackTrace();
}
| public void | paint(java.awt.Graphics g)
g.drawString(message, 25, 50);
|
|