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

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


  private RuntimeException failure;
  private final RemoteLoggerServiceAsync service;

  public RemoteLogger() {
    service = (RemoteLoggerServiceAsync) GWT.create(RemoteLoggerService.class);
    final ServiceDefTarget target = (ServiceDefTarget) service;
    target.setServiceEntryPoint(GWT.getModuleBaseURL() + "gwt-log");

    callback = new AsyncCallback<Object>() {
      public void onFailure(Throwable ex) {
        if (failure == null) {
          failure = new RuntimeException(
              "Remote logging will be suspended due to communication failure with "
                  + service.getClass().getName() + " at " + target.getServiceEntryPoint(), ex);
        }
      }

      public void onSuccess(Object result) {
      }
View Full Code Here


  private ClientList contactList;
  private NextCoffeeView view = new NextCoffeeView( this );

  public NextCoffeeServiceClientImpl( String URL ){
    nextCoffeeService = (NextCoffeeServiceAsync) GWT.create( NextCoffeeService.class );
    ServiceDefTarget endpoint = (ServiceDefTarget) nextCoffeeService;
    endpoint.setServiceEntryPoint( URL );   
  }
View Full Code Here

  private void makeRpcCall() {
    final RpcServiceAsync greetingService = GWT
    .create(RpcService.class);
   
    //The code below sets service entry point to a server url.
    ServiceDefTarget service = (ServiceDefTarget) greetingService;
    String address = "http://gwtmobile-services.appspot.com/rpc";
    service.setServiceEntryPoint(address);
   
    greetingService.greetServer("GWT Mobile UI", new AsyncCallback<String>() {
     
      @Override
      public void onSuccess(String result) {
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

  public RemoteLoggerImpl() {
    if (!GWT.isClient()) {
      throw new UnsupportedOperationException();
    }
    service = (RemoteLoggerServiceAsync) GWT.create(RemoteLoggerService.class);
    final ServiceDefTarget target = (ServiceDefTarget) service;
    String serviceEntryPointUrl = config.serviceEntryPointUrl();
    if (serviceEntryPointUrl != null) {
      target.setServiceEntryPoint(serviceEntryPointUrl);
    }

    callback = new AsyncCallback<ArrayList<LogRecord>>() {

      @Override
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

        public static ConnectorServiceAsync getInstance()
        {
            if (instance == null)
            {
                instance = (ConnectorServiceAsync) GWT.create(ConnectorService.class);
                ServiceDefTarget target = (ServiceDefTarget) instance;
                target.setServiceEntryPoint(SERVICE);
            }
            return instance;
        }
View Full Code Here

        {
            if (instance == null)
            {
                instance = (ContextServiceAsync) GWT
                        .create(ContextService.class);
                ServiceDefTarget target = (ServiceDefTarget) instance;
                target.setServiceEntryPoint(SERVICE);
            }
            return instance;
        }
View Full Code Here

        public static RealmServiceAsync getInstance()
        {
            if (instance == null)
            {
                instance = (RealmServiceAsync) GWT.create(RealmService.class);
                ServiceDefTarget target = (ServiceDefTarget) instance;
                target.setServiceEntryPoint(SERVICE);
            }
            return instance;
        }
View Full Code Here

      callback.onRowsReady(request, new SerializableResponse<Student>(students));
    } else if (rpcMode) {
      // Create the service if needed
      if (dataService == null) {
        dataService = GWT.create(DataSourceService.class);
        ServiceDefTarget endpoint = (ServiceDefTarget) dataService;
        String moduleRelativeURL = GWT.getModuleBaseURL() + "datasource";
        endpoint.setServiceEntryPoint(moduleRelativeURL);
      }

      // Send RPC request for data
      dataService.requestRows(request,
          new AsyncCallback<SerializableResponse<Student>>() {
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.