Search in sources :

Example 6 with ServiceDefTarget

use of com.google.gwt.user.client.rpc.ServiceDefTarget in project pentaho-platform by pentaho.

the class IUnifiedRepositoryWebServiceCache method getService.

/**
 * Get an instance of this async interface for IUnifiedRepositoryWebService.
 *
 * @param url
 *          The url where the remote endpoint is mounted.
 * @return The async instance.
 */
public static IUnifiedRepositoryWebServiceAsync getService(String url) {
    if (service == null) {
        service = (IUnifiedRepositoryWebServiceAsync) GWT.create(IUnifiedRepositoryWebService.class);
        ServiceDefTarget endpoint = (ServiceDefTarget) service;
        endpoint.setServiceEntryPoint(url);
    }
    return service;
}
Also used : ServiceDefTarget(com.google.gwt.user.client.rpc.ServiceDefTarget)

Example 7 with ServiceDefTarget

use of com.google.gwt.user.client.rpc.ServiceDefTarget 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)7 Provides (com.google.inject.Provides)2 Singleton (com.google.inject.Singleton)2 XsrfTokenServiceAsync (com.google.gwt.user.client.rpc.XsrfTokenServiceAsync)1 RemoteCommandServiceAsync (org.activityinfo.legacy.shared.command.RemoteCommandServiceAsync)1 GenericApiGWTServiceAsync (org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync)1