de.novanic.eventservice.client.command
Interface RemoteCommand<T>

All Known Implementing Classes:
DefaultRemoteCommand, RemoteListenCommand

public interface RemoteCommand<T>

A RemoteCommand can be used to execute a call from client to the server side. The possibility to queue RemoteCommands is one of the advantages.

Author:
sstrohschein
Date: 06.06.2008
Time: 22:38:48

Method Summary
 void execute(EventServiceAsync anEventService)
          This method executes the RemoteCommand.
 com.google.gwt.user.client.rpc.AsyncCallback<T> getCallback()
          Returns the callback, which can be set with the link method (init(com.google.gwt.user.client.rpc.AsyncCallback))
 void init(com.google.gwt.user.client.rpc.AsyncCallback<T> aCallback)
          Initializes the RemoteCommand with a callback, which can also be used in the execute method execute(de.novanic.eventservice.client.event.service.EventServiceAsync)
 boolean isInitialized()
          Checks if the RemoteCommand is initialized with a callback.
 

Method Detail

init

void init(com.google.gwt.user.client.rpc.AsyncCallback<T> aCallback)
Initializes the RemoteCommand with a callback, which can also be used in the execute method execute(de.novanic.eventservice.client.event.service.EventServiceAsync)

Parameters:
aCallback - callback

isInitialized

boolean isInitialized()
Checks if the RemoteCommand is initialized with a callback.

Returns:
true when the init method (init(com.google.gwt.user.client.rpc.AsyncCallback)) was called with a callback, false when the RemoteCommand wasn't initialized with a callback.

execute

void execute(EventServiceAsync anEventService)
This method executes the RemoteCommand. This method has access to EventService and to the initialized callback (getCallback()).

Parameters:
anEventService - EventService

getCallback

com.google.gwt.user.client.rpc.AsyncCallback<T> getCallback()
Returns the callback, which can be set with the link method (init(com.google.gwt.user.client.rpc.AsyncCallback))

Returns:
callback