141
|
1 package rep.translater;
|
|
2
|
315
|
3 import rep.Editor;
|
141
|
4 import rep.REPCommand;
|
|
5
|
|
6 public interface Translater {
|
|
7
|
|
8 /**
|
|
9 * Translate command When the editor send REPCommand to remote editor.
|
|
10 * @param command which the editor want to send.
|
|
11 * @return translated command which should be sent by the editor.
|
|
12 */
|
|
13 abstract public REPCommand transSendCmd(REPCommand cmd);
|
|
14
|
|
15 /**
|
|
16 * Inform translater about that the editor receive own command which it sent.
|
|
17 * but in this case, you can use also transReceiveCmd()
|
|
18 * @param command which the editor sent.
|
|
19 */
|
315
|
20 abstract public boolean catchOwnCommand(Editor editor);
|
141
|
21
|
|
22 /**
|
|
23 * Translate Command cmd that was received from SeMa.
|
|
24 * @param cmd the command to be translated.
|
|
25 * @return translated command.
|
|
26 */
|
315
|
27 abstract public void transReceiveCmd(Editor nextEditor,REPCommand cmd);
|
141
|
28
|
|
29 /**
|
|
30 * set the editor's id.
|
|
31 * @param editor's id.
|
|
32 */
|
|
33 abstract public void setEid(int _eid);
|
|
34 }
|