当前位置: 首页>>代码示例>>Java>>正文


Java ServiceDefTarget.setServiceEntryPoint方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.rpc.ServiceDefTarget.setServiceEntryPoint方法的典型用法代码示例。如果您正苦于以下问题:Java ServiceDefTarget.setServiceEntryPoint方法的具体用法?Java ServiceDefTarget.setServiceEntryPoint怎么用?Java ServiceDefTarget.setServiceEntryPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.rpc.ServiceDefTarget的用法示例。


在下文中一共展示了ServiceDefTarget.setServiceEntryPoint方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testGetDomainTree

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
public void testGetDomainTree() {
	// Create the service that we will test.
	AtomServiceAsync atomService = GWT.create(AtomService.class);
	ServiceDefTarget target = (ServiceDefTarget) atomService;
	target.setServiceEntryPoint(GWT.getModuleBaseURL() + "ATOM/rpc");

	// Since RPC calls are asynchronous, we will need to wait for a response
	// after this test method returns. This line tells the test runner to
	// wait
	// up to 10 seconds before timing out.
	delayTestFinish(Integer.MAX_VALUE);

	atomService.getDomainTree(authBackDoor, new AsyncCallback<DomainClass>() {

		public void onFailure(Throwable caught) {
			fail("Request failure: " + caught.getMessage());
		}

		public void onSuccess(DomainClass result) {
			assertEquals(result.getName(), domainObjectClassName);
			finishTest();
		}
	});
}
 
开发者ID:fhcampuswien,项目名称:atom,代码行数:25,代码来源:GwtTestATOM.java

示例2: CalendarProvider

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
public CalendarProvider() {
  // Initialize the service.
  //
  calService = (SchoolCalendarServiceAsync) GWT.create(SchoolCalendarService.class);

  // By default, we assume we'll make RPCs to a servlet, but see
  // updateRowData(). There is special support for canned RPC responses.
  // (Which is a totally demo hack, by the way :-)
  // 
  ServiceDefTarget target = (ServiceDefTarget) calService;

  // Use a module-relative URLs to ensure that this client code can find
  // its way home, even when the URL changes (as might happen when you
  // deploy this as a webapp under an external servlet container).
  String moduleRelativeURL = GWT.getModuleBaseURL() + "calendar";
  target.setServiceEntryPoint(moduleRelativeURL);
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:18,代码来源:SchoolCalendarWidget.java

示例3: testGreetingService

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
/**
 * This test will send a request to the server using the greetServer method in
 * GreetingService and verify the response.
 */
public void testGreetingService() {
  // Create the service that we will test.
  GreetingServiceAsync greetingService = GWT.create(GreetingService.class);
  ServiceDefTarget target = (ServiceDefTarget) greetingService;
  target.setServiceEntryPoint(GWT.getModuleBaseURL() + "EssenceFrontEnd/greet");

  // Since RPC calls are asynchronous, we will need to wait for a response
  // after this test method returns. This line tells the test runner to wait
  // up to 10 seconds before timing out.
  delayTestFinish(10000);

  // Send a request to the server.
  greetingService.greetServer("GWT User", new AsyncCallback<String>() {
    public void onFailure(Throwable caught) {
      // The request resulted in an unexpected error.
      fail("Request failure: " + caught.getMessage());
    }

    public void onSuccess(String result) {
      // Verify that the response is correct.
      assertTrue(result.startsWith("Hello, GWT User!"));

      // Now that we have received a response, we need to tell the test runner
      // that the test is complete. You must call finishTest() after an
      // asynchronous test finishes successfully, or the test will time out.
      finishTest();
    }
  });
}
 
开发者ID:dpinney,项目名称:essence,代码行数:34,代码来源:GwtTestEssenceFrontEnd.java

示例4: getRPCService

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
public static RPCServiceAsync getRPCService() {
	RPCServiceAsync rpcService = (RPCServiceAsync) GWT.create(RPCService.class);
	ServiceDefTarget endpoint = (ServiceDefTarget) rpcService;        
	ClientFactory clientFactory = GWT.create(ClientFactory.class);
       EventBus eventBus = clientFactory.getEventBus();
	String rpcURL = "";
	String base_path = URLUtil.getBaseURL();
	rpcURL = base_path + "rpc";
	endpoint.setServiceEntryPoint(rpcURL);
	return rpcService;
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:12,代码来源:Util.java

示例5: getRemoteServieAsyncObject

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
/**
 * Allows to allocate the remote service object
 * @param classObj the service class object for instantiation
 * @param URL_SUFFIX the url-suffix on the server t send the requests to
 * @return returns the remote service object
 */
public static <R> R getRemoteServieAsyncObject( R remoteService, final String URL_SUFFIX ) {
	ServiceDefTarget endpoint = (ServiceDefTarget) remoteService;
	String moduleRelativeURL = GWT.getModuleBaseURL() + URL_SUFFIX;
	endpoint.setServiceEntryPoint( moduleRelativeURL );
	
	return remoteService;
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:14,代码来源:RPCAccessManager.java

示例6: getAsyncService

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
protected GreetingServiceAsync getAsyncService() {
	GreetingServiceAsync greetingService = GWT
			.create(GreetingService.class);
	ServiceDefTarget target = (ServiceDefTarget) greetingService;
	target.setServiceEntryPoint(GWT.getModuleBaseURL() + "spawebtest/greet");
	return greetingService;
}
 
开发者ID:jcricket,项目名称:gwt-syncproxy,代码行数:8,代码来源:GreetingServiceTest.java

示例7: getInstance

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
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;
}
 
开发者ID:alfameCom,项目名称:salasanasiilo,代码行数:10,代码来源:LoginService.java

示例8: getInstance

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
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;
}
 
开发者ID:alfameCom,项目名称:salasanasiilo,代码行数:10,代码来源:UserService.java

示例9: getInstance

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
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;
}
 
开发者ID:alfameCom,项目名称:salasanasiilo,代码行数:10,代码来源:PasswordService.java

示例10: init

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
private void init(RootPanel root) {
  ServiceDefTarget endpoint = (ServiceDefTarget)_service;
  endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "person-service");

  Column[] columns = {
    new Column(0, false, "First Name", "50%"),
    new Column(1, false, "Last Name", "50%")
  };
  Table table = new Table(new ColumnLayout(columns));
  table.setSize("100%", "100%");
  table.setContentProvider(new PersonContentProvider(table));
  table.update();
  root.add(table);
}
 
开发者ID:sanderberents,项目名称:gwtlib,代码行数:15,代码来源:RPCTableEntryPoint.java

示例11: getInstance

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
public static IOneCMDBGWTServiceAsync getInstance() {
	if (service == null) {
		service =  (IOneCMDBGWTServiceAsync) GWT.create(IOneCMDBGWTService.class);

	      ServiceDefTarget target = (ServiceDefTarget) service;
	      
	      // Use a module-relative URLs to ensure that this client code can find 
	      // its way home, even when the URL changes (as might happen when you 
	      // deploy this as a webapp under an external servlet container). 
	      
	      String moduleRelativeURL = GWT.getModuleBaseURL() + "onecmdb-gwt/wsdl";
	      target.setServiceEntryPoint(moduleRelativeURL);
	}
	return(service);	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:16,代码来源:OneCMDBConnector.java

示例12: get

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
public static IModelServiceAsync get() {
	if (service == null) {
		service =  (IModelServiceAsync) GWT.create(IModelService.class);

		ServiceDefTarget target = (ServiceDefTarget) service;

		// Use a module-relative URLs to ensure that this client code can find 
		// its way home, even when the URL changes (as might happen when you 
		// deploy this as a webapp under an external servlet container). 

		String moduleRelativeURL = GWT.getModuleBaseURL() + "/onecmdb-rpc/IModelService";
		target.setServiceEntryPoint(moduleRelativeURL);
	}
	return(service);	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:16,代码来源:ModelServiceFactory.java

示例13: get

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
public static IContentServiceAsync get() {
	if (service == null) {
		service =  (IContentServiceAsync) GWT.create(IContentService.class);

	      ServiceDefTarget target = (ServiceDefTarget) service;
	      
	      // Use a module-relative URLs to ensure that this client code can find 
	      // its way home, even when the URL changes (as might happen when you 
	      // deploy this as a webapp under an external servlet container). 
	      
	      String moduleRelativeURL = GWT.getModuleBaseURL() + "/onecmdb-rpc/IContentService";
	      target.setServiceEntryPoint(moduleRelativeURL);
	}
	return(service);	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:16,代码来源:ContentServiceFactory.java

示例14: get

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
public static IChangeServiceAsync get() {
	if (changeService == null) {
		changeService =  (IChangeServiceAsync) GWT.create(IChangeService.class);

		ServiceDefTarget target = (ServiceDefTarget) changeService;

		// Use a module-relative URLs to ensure that this client code can find 
		// its way home, even when the URL changes (as might happen when you 
		// deploy this as a webapp under an external servlet container). 

		String moduleRelativeURL = GWT.getModuleBaseURL() + "onecmdb-rpc/IChangeService";
		target.setServiceEntryPoint(moduleRelativeURL);
	}
	return(changeService);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:16,代码来源:ChangeServiceFactory.java

示例15: getService

import com.google.gwt.user.client.rpc.ServiceDefTarget; //导入方法依赖的package包/类
public synchronized T getService() {
    if (service == null) {
        service = createService();
        if (service instanceof ServiceDefTarget) {
            ServiceDefTarget sdt = (ServiceDefTarget) service;
            sdt.setServiceEntryPoint(WebUtil.encodeUrl(GWT.getModuleBaseURL() + location));
            sdt.setRpcRequestBuilder(new CustomBuilder());
        }
    }
    return service;
}
 
开发者ID:lsst,项目名称:firefly,代码行数:12,代码来源:ServiceLocator.java


注:本文中的com.google.gwt.user.client.rpc.ServiceDefTarget.setServiceEntryPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。