首页 > 学院 > 开发设计 > 正文

Java核心代码例程之:RMIExampleServer.java

2019-11-18 15:16:56
字体:
来源:转载
供稿:网友

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!";
}
}

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表