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;
		}
	}
private Instance marshall(ServiceInstance serviceInstance) {
		String hostname = serviceInstance.getHost();
		String cluster = getClusterName(serviceInstance);
		Boolean status = Boolean.TRUE;
		if (hostname != null && cluster != null && status != null) {
			Instance instance = new Instance(hostname, cluster, status);
		
		
		
		
			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;
		}
	}
private instance marshall(serviceinstance serviceinstance) { string hostname = serviceinstance.gethost(); string cluster = getclustername(serviceinstance); boolean status = boolean.true; if (hostname != null && cluster != null && status != null) { instance instance = new instance(hostname, cluster, status); 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; } }