FileDocCategorySizeDatePackage
HelloImpl.javaAPI DocExample2472Sat Sep 12 03:01:00 BST 1998examples.hello

HelloImpl

public class HelloImpl extends UnicastRemoteObject implements Hello

Fields Summary
private String
name
Constructors Summary
public HelloImpl(String s)

	super();
	name = s;
    
Methods Summary
public static voidmain(java.lang.String[] args)

	// Create and install the security manager
	System.setSecurityManager(new RMISecurityManager());

	try {
	    HelloImpl obj = new HelloImpl("HelloServer");
	    Naming.rebind("HelloServer", obj);
	    System.out.println("HelloImpl created and bound in the registry to the name HelloServer");

	} catch (Exception e) {
	    System.out.println("HelloImpl.main: an exception occurred:");
	    e.printStackTrace();
	}
    
public java.lang.StringsayHello()

	return  "Hello World!";