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