}
private Map<ConstraintKey, String> loadConnectionConstraints(
final ManagerConnectionMetadata metadata)
{
FieldConstraint ip = FieldConstraint.NO_APPLICABLE;
FieldConstraint port = FieldConstraint.NO_APPLICABLE;
FieldConstraint credentials = FieldConstraint.NO_APPLICABLE;
if (metadata != null)
{
ip = metadata.ip();
port = metadata.port();
credentials = metadata.credentials();
}
return ImmutableMap.<ConstraintKey, String> builder()
.put(ConstraintKey.MANAGER_IP, ip.name()).put(ConstraintKey.MANAGER_PORT, port.name())
.put(ConstraintKey.MANAGER_CREDENTIALS, credentials.name()).build();
}