Search in sources :

Example 1 with GenericApiGWTServiceAsync

use of org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync in project ovirt-engine by oVirt.

the class BaseSystemModule method getGenericApiGWTService.

@Provides
@Singleton
public GenericApiGWTServiceAsync getGenericApiGWTService(final XsrfRpcRequestBuilder requestBuilder) {
    // no need to use GenericApiGWTServiceAsync.Util as this is GIN-managed singleton anyway
    GenericApiGWTServiceAsync service = GWT.create(GenericApiGWTService.class);
    // cast to ServiceDefTarget and set RPC request builder as needed
    ((ServiceDefTarget) service).setRpcRequestBuilder(requestBuilder);
    return service;
}
Also used : GenericApiGWTServiceAsync(org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync) ServiceDefTarget(com.google.gwt.user.client.rpc.ServiceDefTarget) Singleton(com.google.inject.Singleton) Provides(com.google.inject.Provides)

Aggregations

ServiceDefTarget (com.google.gwt.user.client.rpc.ServiceDefTarget)1 Provides (com.google.inject.Provides)1 Singleton (com.google.inject.Singleton)1 GenericApiGWTServiceAsync (org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync)1