📄 brokerrmiclient.java
字号:
package trader.rmi;
import trader.*;
import trader.gui.*;
import java.rmi.Naming;
import java.rmi.RemoteException;
public class BrokerRMIClient{
BrokerModel model;
BrokerView view;
BrokerController con;
public static void main(String args[]) {
String rmiRegistryHost = "localhost";
try {
if (args.length > 0) {
rmiRegistryHost = args[0];
}
BrokerRMIClient client = new BrokerRMIClient();
client.model = (BrokerModel)
Naming.lookup("//" + rmiRegistryHost + "/TheBroker");
client.view = new BrokerViewImpl(client.model);
client.con =
new BrokerControllerImpl(client.model, client.view);
} catch (Exception e) {
System.out.println("BrokerRMIClient exception: " + e);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -