gwt - How can I implement the command pattern in Java? -


I looked and I'm having trouble finding out how the server side works.

Slide 21 Show:

  / ** Name command is taken * / Interface action & lt; Expands T Response & gt; {} Interface Response {} Interface Contact: Increases Service Remote Service {& lt; T increases the reaction & gt; T executed (action  action); } Interface ContactsServiceAsync {& lt; T increases the reaction & gt; Zero executed (Action & lt; T & gt; Action, Async Callback & lt; T & gt; Callback); }  

I thought I could become

  Public ResponseSubclass executed (ActionSubclass action) {...}  

And GVT chooses that method when it matches my exact criteria, but it is not. Currently I'm using:

  if (action.getClass (). GetName () == ActionSubclass.class.getName ()) {Return (T) executed (ActionSubclass) ); }  

But this means that every time I add a task and I have to use unchecked tapes, IFS has to be added in that method to do this work Is there a better way?

Note: Whatever I have read elsewhere, the command pattern will usually include actions occurring in the subclass, but because it acts as an object for a client server, the execution of the operation is different To do.

checkout and how to use it.

On the one hand, Ray Ryan can be one of the best articles referenced about IO and uses a GWT-Dispatch application that can become a Hello World app.

-JP


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -