Examples of USMTNucleiDiscoveryUtil


Examples of com.fujitsu.usmt.client.util.USMTNucleiDiscoveryUtil

  public static W3CEndpointReference discoverGateway()
      throws InterruptedException {
    LOG.debug("Discovering gateway ...");
    W3CEndpointReference gatewayEPR = null;
    USMTNucleiDiscoveryUtil util = USMTNucleiDiscoveryUtil.getInstance();

    List<I_USMTNucleus> nList = util.getNuclei();
    for (int i = 0; i < MAX_RETRY_FOR_GATEWAY; i++) {
      for (I_USMTNucleus nucleus : nList) {
        List<ServiceInstanceDescriptionType> sidtList = util
            .getServiceInstances(nucleus, new QName(
                "http://www.admire-project.eu/gateway",
                "Gateway"));
        if (sidtList.size() > 0) {
          gatewayEPR = sidtList.get(0).getEndpointReference();
        }

        if (gatewayEPR != null) {
          break;
        }
      }

      if (gatewayEPR != null) {
        break;
      }
      Thread.sleep(1000);
      nList = util.getNuclei();
    }
    util.stopDiscovering();
    return gatewayEPR;

  }
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.