Content
Mock Sketch of Base Service
RemoteService
^
| extends
SampleService (interface)
RemoteService
^
| extends
SampleService (interface)
RemoteServiceServlet
^
| extends
SampleServiceImpl (class)
^
| extends
SampleServiceImpl (class)
SampleService
^
| implements
SampleServiceImpl (class)
SampleServiceAsync
^
| implements
GWT Proxy Stuff
^
| implements
GWT Proxy Stuff
ServiceDefTarget (interface)
^
| implements
GWT Proxy Stuff
o GWT Creates Automatically Proxy For Asynchronous Implementation,
which we never need to be concern with
SampleServiceAsync
^
| composedof service(sampleService)
Sample (class)
^
| composedof service(sampleService)
Sample (class)
o Code asynchronous call:
sampleService.getMessage(new AsyncCallback
@Override
public void onSuccess(String result) {
…
}
@Override
public void onFailure(Throwable caught) {
…
}
});