de.novanic.eventservice.client.command
Class DefaultRemoteCommand<T>

java.lang.Object
  extended by de.novanic.eventservice.client.command.DefaultRemoteCommand<T>
All Implemented Interfaces:
RemoteCommand<T>
Direct Known Subclasses:
RemoteListenCommand

public abstract class DefaultRemoteCommand<T>
extends java.lang.Object
implements 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:40:48

Constructor Summary
DefaultRemoteCommand()
           
 
Method Summary
 com.google.gwt.user.client.rpc.AsyncCallback<T> getCallback()
          Returns the callback, which can be set with the link method (RemoteCommand.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 RemoteCommand.execute(de.novanic.eventservice.client.event.service.EventServiceAsync)
 boolean isInitialized()
          Checks if the RemoteCommand is initialized with a callback.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.novanic.eventservice.client.command.RemoteCommand
execute
 

Constructor Detail

DefaultRemoteCommand

public DefaultRemoteCommand()
Method Detail

init

public 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 RemoteCommand.execute(de.novanic.eventservice.client.event.service.EventServiceAsync)

Specified by:
init in interface RemoteCommand<T>
Parameters:
aCallback - callback

isInitialized

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

Specified by:
isInitialized in interface RemoteCommand<T>
Returns:
true when the init method (RemoteCommand.init(com.google.gwt.user.client.rpc.AsyncCallback)) was called with a callback, false when the RemoteCommand wasn't initialized with a callback.

getCallback

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

Specified by:
getCallback in interface RemoteCommand<T>
Returns:
callback