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;
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 {
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);
Executes a command. The command is executed on the server and on all listening clients.
Command<?> executeCommand(Command<?> command, String clientId);