📄 myremoteimpl.java
字号:
/* * MyRemoteImpl.java * * Created on 2006年9月14日, 下午1:51 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */package simplermi;import java.rmi.RemoteException;import java.rmi.server.UnicastRemoteObject;import java.sql.ResultSet;import java.util.ArrayList;/** * 远程接口的实现类 抽象方法被实现了 * @author jiang * @version 1.0 */public class MyRemoteImpl extends UnicastRemoteObject implements MyRemoteInterface{ /** * Creates a new instance of MyRemoteImpl */ public MyRemoteImpl() throws RemoteException { } /** * 抽象方法的具体实现 * @param cmd 传入的命令 * @return ArrayList类型的对象 * @version 1.0 */ public ArrayList getFromDatabase(String cmd) throws RemoteException { ArrayList result=new ArrayList(); if(cmd.equals("query")) { result.add("hello"); } return result; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -