Java核心代码例程之:RMIExampleServer.java
2008-01-05 08:38:21 来源:WEB开发网核心提示:import java.rmi.*;import java.rmi.server.*;/** * This class is a simple example of a RMI Server * @author Renga **/public class RMIExampleServer extends Unicast
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!";
}
}
赞助商链接