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