"I show you how deep the rabbit hole goes"
public class AGinModule
extends AbstractGinModule {
@Override
protected void configure() {
bind(EventBus.class)
.to(SimpleEventBus.class).in(Singleton.class);
}
}
@GinModules({AGinModule.class})
public interface HelloGinjector extends Ginjector {
EventBus getEventBus();
}
@javax.inject.Inject
EventBus bus;
@RemoteServiceRelativePath("greet")
public interface GreetingService extends RemoteService {
String greetServer(String name);
}
public interface GreetingServiceAsync {
void greetServer(String name, AsyncCallback<String> callback);
}
public class GreetingServiceImpl extends RemoteServiceServlet
implements GreetingService {
public String greetServer(String input)
}
Request:
Response:
Thrift request
Thrift response
app.gwt.xml
app.gwt.xml
app.gwt.xml
public static native void alert(String msg) /*-{
$wnd.alert(msg);
}-*/;
public MyUtilityClass{
public static int computeLoanInterest(int amt,
float interestRate, int term)
{
}
public static native void exportStaticMethod()
/*-{
$wnd.computeLoanInterest =
$entry(@mypackage.MyUtilityClass::computeLoanInterest(IFI));
}-*/;
}
public class Example implements EntryPoint {
public void onModuleLoad() {
GWT.setUncaughtExceptionHandler(new
GWT.UncaughtExceptionHandler(){
public void onUncaughtException(Throwable e)
{
// Обработка исключения
// Вывод в консоль браузера
// Отправка на сервер для записи в Log
}
});
}
}
SymbolMaps
├── rpcPolicyManifest │ ├── manifests │ │ ├── 00B81EDF1ED878A9499F77A6BD72F97F.txt │ │ ├── 27129259FF55ECBA1F313FA0BADCBA06.txt │ │ └── CC6E72C03242CD463A2772C4EB4319A3.txt │ └── manifest.txt └── symbolMaps ├── 13210C7473C45016FBFC764429C5C72E.symbolMap ├── 3E4B428A471EFD1DC803630D26A049E0.symbolMap ├── 404EF130736C6AC4DE2BD3A75256BD93.symbolMap ├── 62BE5A8854B6B01F24C28CAAF8042C17.symbolMap ├── 748D3FC843595E743A328BC78E15A9C1.symbolMap ├── 8ADFAB542FFF497459382D8182742EC4.symbolMap ├── 8DD9F56074FF19AFDD37F4A9273CC6F6.symbolMap ├── 9770311386402AEAA5B61BFAF6D8B0BD.symbolMap ├── C4F82D4876541A04B1F97B261F3D6517.symbolMap └── D6682ADEC5C101DDB41DDA2392DBD6AF.symbolMap