//TODO: where to get?
private Instance marshall(ServiceInstance serviceInstance) {
		String hostname = serviceInstance.getHost();
		String cluster = getClusterName(serviceInstance);
		Boolean status = Boolean.TRUE; //TODO: where to get?
		if (hostname != null && cluster != null && status != null) {
			Instance instance = new Instance(hostname, cluster, status);
			// TODO: reimplement when metadata is in commons
			// add metadata
			/*Map<String, String> metadata = instanceInfo.getMetadata();
			if (metadata != null) {
				instance.getAttributes().putAll(metadata);
			}*/
			// add ports
			instance.getAttributes().put("port", String.valueOf(serviceInstance.getPort()));
			boolean securePortEnabled = serviceInstance.isSecure();
			if (securePortEnabled) {
				instance.getAttributes().put("securePort", String.valueOf(serviceInstance.getPort()));
			}
			return instance;
		}
		else {
			return null;
		}
	}
String hostname = serviceInstance.getHost();
String cluster = getClusterName(serviceInstance);
Boolean status = Boolean.TRUE; //TODO: where to get?
if (hostname != null && cluster != null && status != null) {
Instance instance = new Instance(hostname, cluster, status);
private Instance marshall(ServiceInstance serviceInstance) {
String hostname = serviceInstance.getHost();
String cluster = getClusterName(serviceInstance);
Boolean status = Boolean.TRUE; //TODO: where to get?
if (hostname != null && cluster != null && status != null) {
Instance instance = new Instance(hostname, cluster, status);
// TODO: reimplement when metadata is in commons
// add metadata
/*Map<String, String> metadata = instanceInfo.getMetadata();
if (metadata != null) {
instance.getAttributes().putAll(metadata);
}*/
// add ports
instance.getAttributes().put("port", String.valueOf(serviceInstance.getPort()));
private Instance marshall(ServiceInstance serviceInstance) {
String hostname = serviceInstance.getHost();
String cluster = getClusterName(serviceInstance);
Boolean status = Boolean.TRUE; //TODO: where to get?
if (hostname != null && cluster != null && status != null) {
Instance instance = new Instance(hostname, cluster, status);
// TODO: reimplement when metadata is in commons
// add metadata
/*Map<String, String> metadata = instanceInfo.getMetadata();
if (metadata != null) {
instance.getAttributes().putAll(metadata);
}*/
// add ports
instance.getAttributes().put("port", String.valueOf(serviceInstance.getPort()));
boolean securePortEnabled = serviceInstance.isSecure();
if (securePortEnabled) {
instance.getAttributes().put("securePort", String.valueOf(serviceInstance.getPort()));
}
return instance;
}
else {
return null;
}
}