import java.rmi.*;
import java.rmi.server.*;
/**
* this class is a simple example of a rmi server
* @author renga
**/
public class rmiexampleserver extends unicastremoteobject
implements rmiexample {
/**
* do nothing constructor
* @throws remoteexception
**/
public rmiexampleserver() throws remoteexception {
system.out.println( "rmiexampleserver::cntr" );
}
/**
* returns "hello world from rmi!"
* @return a string
* @throws remoteexception
**/
public string sayhello() throws remoteexception {
return "hello world from rmi!";
}
}
闽公网安备 35060202000074号