📄 infcollection.java
字号:
package serviceImpl;import java.rmi.Remote;import java.rmi.RemoteException;import java.net.*;import naplet.*;/** * Implementation of non-priviledged serivces, which are to be called * by naplets directly. */public class InfCollection implements service.InfCollection { private String msg; public InfCollection() throws RemoteException{ try { msg = "Greeting from " + InetAddress.getLocalHost().getHostName(); } catch (java.net.UnknownHostException e) { System.out.println("Unable to get local host name"); } } public String getMsg() throws RemoteException { return msg; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -