📄 callbackimp.java
字号:
import java.rmi.*;
import java.rmi.server.*;
public class CallBackImp extends UnicastRemoteObject
implements CallBack
{
private ChatClient thisClient;
public CallBackImp(Object client) throws RemoteException
{
thisClient = (ChatClient) client;
}
public void addMessage(String from, String message)throws RemoteException
{
thisClient.getMessageBox().append("<" + from + ">" + message + "\n");
}
public void quitMessage(String from)throws RemoteException
{
thisClient.getMessageBox().append(from + " has left.\n");
}
public void joinedMessage(String from)throws RemoteException
{
thisClient.getMessageBox().append(from + " has joined.\n");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -