Package com.google.gwt.user.client.rpc

Examples of com.google.gwt.user.client.rpc.ServiceDefTarget


  public GWTRunner() {
    sInstance = this;

    // Bind junitHost to the appropriate url.
    ServiceDefTarget endpoint = (ServiceDefTarget) junitHost;
    String url = GWT.getModuleBaseURL() + "junithost";
    endpoint.setServiceEntryPoint(url);

    // Null out the default uncaught exception handler since we will control it.
    GWT.setUncaughtExceptionHandler(null);
  }
View Full Code Here


     * Creates an instance of the EventService.
     * @return EventService
     */
    private static EventServiceAsync createEventService() {
        final String theServiceURL = GWT.getModuleBaseURL() + "gwteventservice";
        ServiceDefTarget theServiceEndPoint = (ServiceDefTarget)GWT.create(EventService.class);
        theServiceEndPoint.setServiceEntryPoint(theServiceURL);
        return (EventServiceAsync)theServiceEndPoint;
    }
View Full Code Here

   */

  public static IUnifiedRepositoryWebServiceAsync getService( String url ) {
    if ( service == null ) {
      service = (IUnifiedRepositoryWebServiceAsync) GWT.create( IUnifiedRepositoryWebService.class );
      ServiceDefTarget endpoint = (ServiceDefTarget) service;
      endpoint.setServiceEntryPoint( url );
    }
    return service;
  }
View Full Code Here

  public void onModuleLoad() {

    init();

    // Asynchronously load the summaries
    ServiceDefTarget target = (ServiceDefTarget) GWT.create(ReportServer.class);
    target.setServiceEntryPoint(GWT.getModuleBaseURL() + "test_reports");
    reportServer = (ReportServerAsync) target;

    reportServer.getReportSummaries(new AsyncCallback() {
      public void onFailure(Throwable caught) {
        String msg = "<p>" + caught.toString() + "</p>"
View Full Code Here

        private static PasswordServiceAsync instance;
        public static PasswordServiceAsync getInstance()
        {
            if (instance == null) {
                instance = (PasswordServiceAsync) GWT.create(PasswordService.class);
                ServiceDefTarget target = (ServiceDefTarget) instance;
                target.setServiceEntryPoint(GWT.getModuleBaseURL() + "rpc/PasswordService");
            }
            return instance;
        }
View Full Code Here

        private static LoginServiceAsync instance;
        public static LoginServiceAsync getInstance()
        {
            if (instance == null) {
                instance = (LoginServiceAsync) GWT.create(LoginService.class);
                ServiceDefTarget target = (ServiceDefTarget) instance;
                target.setServiceEntryPoint(GWT.getModuleBaseURL() + "rpc/LoginService");
            }
            return instance;
        }
View Full Code Here

        private static UserServiceAsync instance;
        public static UserServiceAsync getInstance()
        {
            if (instance == null) {
                instance = (UserServiceAsync) GWT.create(UserService.class);
                ServiceDefTarget target = (ServiceDefTarget) instance;
                target.setServiceEntryPoint(GWT.getModuleBaseURL() + "rpc/UserService");
            }
            return instance;
        }
View Full Code Here

  // instances?
  public GWTRunner() {
    sInstance = this;

    // Bind junitHost to the appropriate url.
    ServiceDefTarget endpoint = (ServiceDefTarget) junitHost;
    String url = GWT.getModuleBaseURL() + "junithost";
    endpoint.setServiceEntryPoint(url);

    // Null out the default uncaught exception handler since we will control it.
    GWT.setUncaughtExceptionHandler(null);
  }
View Full Code Here

    });
  }

  private void makeAsyncCall(String url, AsyncCallback callback) {
    ServletMappingTestServiceAsync async = (ServletMappingTestServiceAsync) GWT.create(ServletMappingTestService.class);
    ServiceDefTarget target = (ServiceDefTarget) async;
    target.setServiceEntryPoint(url);
    delayTestFinish(RPC_WAIT);
    async.which(callback);
  }
View Full Code Here

  private AbstractServiceProxy() {
  }

  public static void initService(Object service) {
    // sets the url = prefix + service class name +suffix
    ServiceDefTarget target = (ServiceDefTarget) service;
    String serviceName = service.getClass().getName();
    StringBuffer sb = new StringBuffer();
    sb.append(prefix);

    serviceName = serviceName.substring(serviceName.lastIndexOf('.') + 1,
        serviceName.lastIndexOf("RpcService"));
    sb.append(serviceName.substring(0, 1).toLowerCase());
    sb.append(serviceName.substring(1));

    sb.append(sufix);
    target.setServiceEntryPoint(sb.toString());
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.rpc.ServiceDefTarget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.