Hi.

I've created a registry of AcitonHandlers.

List<AcitonHandler> handlers = getActionHandlers();

public interface ActionHandler {
 public boolean supports(Action<T> action);
 public <T extends Response> T execute(Action<T> action);
}

For each command correspondent action handler will be found and executed.
You can find the example here
http://sourceforge.net/projects/simpleworklog/develop

Please note, project is in pre-alpha stage now, but can be compiled and
launched.

--
Kind regards,
Ignat Alexeyenko.

On Mon, Feb 8, 2010 at 9:53 PM, bhomass <[email protected]> wrote:

> On Ray Ryan's presentation, there is no sample code for implementation
> of the ContactsService.
>
> The code structure would look something like
>
> public class ContactsServiceImpl implements RTSService {
>
>        @Override
>        public <T extends Response> T execute(Action<T> action) {
>                // TODO Auto-generated method stub
>                return null;
>        }
>
> }
>
> I am wondering how do you use one execute to implement server side
> functions for all the possible actions? do you use a factory method to
> identify the action class and send the request off to different
> utility classes to process?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to