Package fr.imag.adele.apam.distriman.client

Examples of fr.imag.adele.apam.distriman.client.RemoteMachine


     *            the RemoteMachine URL
     * @return the destroyed RemoteMachine or null if not present.
     */
    @Override
    public RemoteMachine destroyRemoteMachine(String url, String id) {
  RemoteMachine machine;

  synchronized (machines) {
      machine = machines.remove(url);
  }

  if (machine != null) {
      logger.info("destroying machine {}", url);
      machine.destroy();
  } else {

      logger.info("machine not found by url {} looking for by id {}",
        url, id);

View Full Code Here


     *         <code>url</code>
     */
    public RemoteMachine getRemoteMachine(String url) {
  synchronized (machines) {

      RemoteMachine rm = machines.get(url);

      return rm;

  }
    }
View Full Code Here

    logger.error("machine {} is already in the pool of machines",
      url);
    return machines.get(url);
      }

      RemoteMachine machine = machines.put(url, new RemoteMachine(url,
        id, this, isLocalhost));

      return machine;
  }
    }
View Full Code Here

    Component source = relToResolve.getLinkSource();
   
    for (Map.Entry<String, RemoteMachine> element : remotes.getMachines()
        .entrySet()) {

      RemoteMachine machine = element.getValue();
      String urlForResolution = element.getKey();

      if (machine.isLocalhost()) {
        continue;
      }

      try {

        logger.info("trying to resolve in machine key {} and url {}",
            urlForResolution, urlForResolution);

        resolved = machine.resolveRemote((Instance) source,
            relToResolve);

        if (resolved != null
            && (resolved.singletonResolved != null || resolved.setResolved != null)) {
          break;
View Full Code Here

    }

    // Get the composite that represent the remote machine asking to resolve
    // the RemoteDependency

    RemoteMachine remote = remotes.getMachines().get(providerURL);

    // No RemoteMachine corresponding to the given url is available
    if (remote == null) {
      return null;
    }

    logger.info("remote machine recovered key:{} ", remote.getURLServlet());

    return endpointFactory.resolveAndExport(dependency, remote);
  }
View Full Code Here

      String conteTemplate = "<tr><tr><td>%s</td><td>%s</td><td>%s</td><tr>";

      String conte = "";

      for (String key : discovery.getMachines().keySet()) {
    RemoteMachine machine = discovery.getMachines().get(key);
    conte += String.format(conteTemplate, machine.getURLServlet(),
      "NONE", "NONE");
      }

      if (discovery.getMachines().size() == 0) {
    conte += "<tr><td colspan='3' align='center'>No remote nodes available</td><tr>";
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.distriman.client.RemoteMachine

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.