public static HostDescription createHostDescription (HostDescriptor hostDescriptor){ HostDescription hostDescription = new HostDescription(HostDescriptionType.type); hostDescription.getType().setHostAddress(hostDescriptor.getHostAddress()); hostDescription.getType().setHostName(hostDescriptor.getHostname());
public static HostDescription createHostDescription(String hostName, String hostAddress, String hostEndpoint, String gatekeeperEndpoint, String providerType) { HostDescription host = new HostDescription(); host.getType().setHostName(hostName); host.getType().setHostAddress(hostAddress); if(providerType.equalsIgnoreCase(HostTypes.GLOBUS_HOST_TYPE)){ host.getType().changeType(GlobusHostType.type); ((GlobusHostType) host.getType()). setGridFTPEndPointArray(new String[]{hostEndpoint}); ((GlobusHostType) host.getType()). setGlobusGateKeeperEndPointArray(new String[]{gatekeeperEndpoint}); }else if (providerType.equalsIgnoreCase(HostTypes.SSH_HOST_TYPE)){ host.getType().changeType(SSHHostType.type); }else if (providerType.equalsIgnoreCase(HostTypes.UNICORE_HOST_TYPE)){ host.getType().changeType(GlobusHostType.type); ((UnicoreHostType) host.getType()). setGridFTPEndPointArray(new String[]{hostEndpoint}); ((UnicoreHostType) host.getType()). setUnicoreBESEndPointArray(new String[]{gatekeeperEndpoint}); } return host; }