------------------Show Code ( lines)------------------
package com.todomvc.shared.service;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.todomvc.shared.command.Command;
1

Maintains a registry of clients that can edit objects by executing commands and sends an receives Command's to and from clients. Check the implementation.

@RemoteServiceRelativePath("cmd")
public interface CommandService extends RemoteService {
2

Opens a browser channel and subscribes the client for receiving object updates over the channel. It returns the channel token. Throws IllegalArgumentException if the client attempts to open a channel for an object for which it has a channel already open.

	String openChannel(String objectId, String clientId) throws IllegalArgumentException;

	void closeChannel(String clientId);
3

Executes a command. The command is executed on the server and on all listening clients.

	Command<?> executeCommand(Command<?> command, String clientId);
4

Declared only to force Command to be included in the GWT serialization policy. Do not call.

	Command<?> dummyCommand();
}