Content
SampleService
^
| composedof
SampleServiceAsync (interface)
^
| composedof
SampleServiceAsync (interface)
o We create the asynchronous Sample Service
o On the Client Side GWT creates stubs and the necessary
o Here is the code we should create in the com.sample.client package:
public interface SampleServiceAsync {
void getMessage(AsyncCallback callback);
}
SampleServiceAsync
^
| implements
GWT Proxy Stuff
^
| implements
GWT Proxy Stuff
ServiceDefTarget (interface)
^
| implements
GWT Proxy Stuff
o GWT creates a proxy of our service by create the service
instances for ServiceDefTarget
o In eclipse, an red x error appears, on the left of the Java code.
o Click the red x, a popup appears, indicating it will
“Create asynchronous remote service…”
o The New Asynchronous Remote Service panel appears
o Click: Finish
o The SampleServiceAsync interface is created with this method:
o Click the red x, a popup appears, indicating it will
“Create asynchronous remote service…”
o The New Asynchronous Remote Service panel appears
o Click: Finish
o The SampleServiceAsync interface is created with this method:
void getMessage(AsyncCallbackcallback);