?? myrmiimpl.java
字號:
package com.antbang.rmilab;/* * To change this template, choose Tools | Templates * and open the template in the editor. *//** * * @author GAGA */import java.rmi.*;import java.rmi.server.UnicastRemoteObject;import java.util.Date;import java.util.Properties;public class MyRMIImpl extends UnicastRemoteObject implements MyRMIInterface{ public MyRMIImpl(String name) throws RemoteException { super(); try { Naming.rebind(name, this); } catch (Exception e) { System.out.println("Exception occurred: " + e); } } public Date getDate() { return new java.util.Date(); } public String getDiscription() { StringBuilder hostDescription = new StringBuilder(); Properties properties=System.getProperties(); for (Object key : properties.keySet()) { if(properties.get(key).toString().length()>30) continue; hostDescription.append(key+""+" : "); hostDescription.append(properties.get(key)+"\n"); } return hostDescription.toString(); } public void sendMessage(Message message) throws RemoteException { System.out.println(message); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -