Examples of ClientService


Examples of ch.fusun.baron.client.rmi.ClientService

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    MarriageProposalDialog dialog = new MarriageProposalDialog();
    if (dialog.open() == SWT.OK) {
      ClientService client = ReInjector.getInstance()
          .getInstanceForClass(ClientService.class);
      client.execute(new ProposeMarriageCommand(dialog.getProposer(),
          dialog.getProposedTo()));
    }
    return null;
  }
View Full Code Here

Examples of com.hazelcast.core.ClientService

    @Test(expected = NullPointerException.class)
    public void testAddClientListener_whenListenerIsNull(){
        HazelcastInstance instance = Hazelcast.newHazelcastInstance();

        ClientService clientService = instance.getClientService();
        clientService.addClientListener(null);
    }
View Full Code Here

Examples of com.hazelcast.core.ClientService

    @Test(expected = NullPointerException.class)
    public void testRemoveClientListener_whenIdIsNull(){
        HazelcastInstance instance = Hazelcast.newHazelcastInstance();

        ClientService clientService = instance.getClientService();
        clientService.removeClientListener(null);
    }
View Full Code Here

Examples of com.hazelcast.core.ClientService

    @Test
    public void testRemoveClientListener_whenListenerAlreadyRemoved(){
        HazelcastInstance instance = Hazelcast.newHazelcastInstance();

        ClientService clientService = instance.getClientService();
        ClientListener clientListener = mock(ClientListener.class);
        String id = clientService.addClientListener(clientListener);

        // first time remove
        clientService.removeClientListener(id);

        // second time remove
        clientService.removeClientListener(id);
    }
View Full Code Here

Examples of com.hazelcast.core.ClientService

    @Test
    public void testRemoveClientListener_whenNonExistingId(){
        HazelcastInstance instance = Hazelcast.newHazelcastInstance();

        ClientService clientService = instance.getClientService();

        clientService.removeClientListener("foobar");
    }
View Full Code Here

Examples of com.hazelcast.core.ClientService

        final HazelcastInstance instance = Hazelcast.newHazelcastInstance();

        final HazelcastInstance client1 = HazelcastClient.newHazelcastClient();
        final HazelcastInstance client2 = HazelcastClient.newHazelcastClient();

        final ClientService clientService = instance.getClientService();
        final Collection<Client> connectedClients = clientService.getConnectedClients();
        assertEquals(2, connectedClients.size());

        final String uuid1 = client1.getLocalEndpoint().getUuid();
        final String uuid2 = client2.getLocalEndpoint().getUuid();
        for (Client connectedClient : connectedClients) {
View Full Code Here

Examples of com.ibm.sbt.services.client.ClientService

                // Compose the URL to the service
                // (delegate to the service type)
                Map<String, String> params = getParameters(fileService, index, blockSize);

                ClientService svc;
                String serviceUrl = getServiceUrl();
                if(StringUtil.isEmpty(serviceUrl)){
                    //TODO we need to tidy this up - the fileServiceData should not have a serviceUrl attribute - that should only be associated with the FileType
                    serviceUrl = fileService.getServiceUrl();
                }
View Full Code Here

Examples of com.ibm.sbt.services.client.ClientService

            service.addUrlParameters(map, index, blockSize);
            return map;
        }

        protected ClientService createService(Endpoint endpoint, IFileType fileService, String url) throws ClientServicesException {
            ClientService svc = fileService.createClientService(endpoint, url);
            return svc;
        }
View Full Code Here

Examples of com.ibm.sbt.services.client.ClientService

        try {
            HashMap<String, String> params = new HashMap<String, String>();
            params.put("root", "dropbox");
            rowId = URLDecoder.decode(rowId, "UTF-8");
            params.put("path", rowId);
            ClientService svc = createClientService(authBean, ExtLibUtil.concatPath(getDropBoxApiVersion(authBean), "fileops/delete", '/'));

            svc.post(getDropBoxApiVersion(authBean)+"/fileops/delete", params,null);

        } catch (ClientServicesException e) {
            throw new FacesExceptionEx(e, "Failed to delete file with ID \'{0}\'", rowId);
        } catch (UnsupportedEncodingException e) {
            throw new FacesExceptionEx(e, "Failed to delete file with ID \'{0}\'", rowId);
View Full Code Here

Examples of com.ibm.sbt.services.client.ClientService

            return;
        }
       
        String deleteURL = "files/basic/api/library/" + rep + "/document/" + rowId + "/entry";
        try {
            ClientService svc = createClientService(endpoint, deleteURL);
            svc.delete(deleteURL);
        } catch (ClientServicesException e) {
            // TODO -- revisit this... Connections is thowing an exception here even though the operation worked OK
            // throw new FacesExceptionEx(e);
        }
    }
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.