Examples of CampaignRPC


Examples of net.cloudcodex.shared.rpc.CampaignRPC

    final HomeRPCAsync homeRpc = clientHome.createRemoteServicePojoProxy(HomeRPCAsync.class);

    URL urlCampaign = new URL("http://localhost:8888/cloudcodex/campaign2");
    GwtRpcCommLayerClient clientCampaign = new GwtRpcCommLayerClient(urlCampaign, http.getCookieStore().getCookies());
    clientCampaign.setGwtRpcClientSizeProxyImplClass(Proxy.class.getName());
    final CampaignRPC campaignRpc = clientCampaign.createRemoteServicePojoProxy(CampaignRPC.class);
   
    // asynchronous call
    homeRpc.getHome(new AsyncCallback<Result<HomeDTO>>() {
     
      @Override
      public void onSuccess(Result<HomeDTO> result) {

        System.err.println(result.hasErrors());
        final HomeDTO home = result.getData();
       
        System.err.println(home.getNickname() + " : ");
        for(CharacterSummaryDTO character : home.getCharacters()) {
         
          // synchronous call
          System.err.println("\n----------------\n" + character.getName() + " : ");
          final Result<List<SceneDTO>> result2 =
            campaignRpc.getMessages(character.getCampaign().getId(), character.getId(), null, null);

          final List<SceneDTO> scenes = result2.getData();
          for(SceneDTO scene : scenes) {
            final StringBuffer buffer = new StringBuffer();
            final Map<Long, CharacterHeaderDTO> authors = new HashMap<Long, CharacterHeaderDTO>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.