public static Map<String, String> toMap(WSManEndpoint endpoint) { Map<String, String> attributes = new HashMap<>(); attributes.put(URL, endpoint.getUrl().toString()); attributes.put(SERVER_VERSION, endpoint.getServerVersion().toString()); attributes.put(GSS_AUTH, Boolean.toString(endpoint.isGSSAuth())); attributes.put(STRICT_SSL, Boolean.toString(endpoint.isStrictSSL())); if (endpoint.isBasicAuth()) { attributes.put(USERNAME, endpoint.getUsername()); attributes.put(PASSWORD, endpoint.getPassword()); } if (endpoint.getConnectionTimeout() != null) { attributes.put(CONNECTION_TIMEOUT, endpoint.getConnectionTimeout().toString()); } if (endpoint.getMaxElements() != null) { attributes.put(MAX_ELEMENTS, endpoint.getMaxElements().toString()); } if (endpoint.getMaxEnvelopeSize() != null) { attributes.put(MAX_ENVELOPE_SIZE, endpoint.getMaxEnvelopeSize().toString()); } if (endpoint.getReceiveTimeout() != null) { attributes.put(RECEIVE_TIMEOUT, endpoint.getReceiveTimeout().toString()); } return attributes; }
public static Map<String, String> toMap(WSManEndpoint endpoint) { Map<String, String> attributes = new HashMap<>(); attributes.put(URL, endpoint.getUrl().toString()); attributes.put(SERVER_VERSION, endpoint.getServerVersion().toString()); attributes.put(GSS_AUTH, Boolean.toString(endpoint.isGSSAuth())); attributes.put(STRICT_SSL, Boolean.toString(endpoint.isStrictSSL())); if (endpoint.isBasicAuth()) { attributes.put(USERNAME, endpoint.getUsername()); attributes.put(PASSWORD, endpoint.getPassword()); } if (endpoint.getConnectionTimeout() != null) { attributes.put(CONNECTION_TIMEOUT, endpoint.getConnectionTimeout().toString()); } if (endpoint.getMaxElements() != null) { attributes.put(MAX_ELEMENTS, endpoint.getMaxElements().toString()); } if (endpoint.getMaxEnvelopeSize() != null) { attributes.put(MAX_ENVELOPE_SIZE, endpoint.getMaxEnvelopeSize().toString()); } if (endpoint.getReceiveTimeout() != null) { attributes.put(RECEIVE_TIMEOUT, endpoint.getReceiveTimeout().toString()); } return attributes; }