?? callbackimpl.java
字號:
import java.rmi.*;import java.rmi.server.*;public class CallBackImpl extends UnicastRemoteObject implements CallBack { // The client will be called by the server through callback private TicTacToeClientRMI thisClient; /** Constructor */ public CallBackImpl(Object client) throws RemoteException { thisClient = (TicTacToeClientRMI)client; } /** The server notifies the client for taking a turn */ public void takeTurn(boolean turn) throws RemoteException { thisClient.setMyTurn(turn); } /** The server sends a message to be displayed by the client */ public void notify(String message) throws RemoteException { thisClient.setMessage(message); } /** The server notifies a client of the other player's move */ public void mark(int row, int column, char token) throws RemoteException { thisClient.mark(row, column, token); }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -