public Map<String,String> toMap() { final Map<String,String> result = new HashMap<>(); if (entries != null) { for (final EntryXBean entry : entries) { result.put(entry.getKey(), entry.getValue()); } } return result; }
public Map<String,String> toMap() { final Map<String,String> result = new HashMap<>(); if (entries != null) { for (final EntryXBean entry : entries) { result.put(entry.getKey(), entry.getValue()); } } return result; }
protected Map<String, String> getHeadersAsMap() { final Map<String, String> result = new HashMap<>(); if (headers != null) { for (final EntryXBean entry : headers) { entry.validate(); result.put(entry.getKey(), entry.getValue()); } } return result; }
protected Map<String, String> getHeadersAsMap() { final Map<String, String> result = new HashMap<>(); if (headers != null) { for (final EntryXBean entry : headers) { entry.validate(); result.put(entry.getKey(), entry.getValue()); } } return result; }
@Override public Object getValue() { super.validate(); final Map<String, String> result = new HashMap<>(); for (final EntryXBean entry : entries) { entry.validate(); result.put(entry.getKey(), entry.getValue()); } return result; } }
@Override public Object getValue() { super.validate(); final Map<String, String> result = new HashMap<>(); for (final EntryXBean entry : entries) { entry.validate(); result.put(entry.getKey(), entry.getValue()); } return result; } }
@Override protected InputConfig createConfig() { List<Pattern> ignorePatterns; if (ignore != null) { ignorePatterns = new ArrayList<Pattern>(ignore.size()); for (final IgnoreObjectNameXBean ignoreObjectName : ignore) { try { ignorePatterns.add(Pattern.compile(ignoreObjectName.getRegexp())); } catch (final PatternSyntaxException e) { throw new ConfigurationException("Pattern "+ignoreObjectName+" cannot compile: " + e.getMessage()); } } } else { ignorePatterns = Collections.emptyList(); } final Map<String, String> configConnectionProperties = new HashMap<>(); if (connectionProperties != null) { for (final EntryXBean entry : connectionProperties) { configConnectionProperties.put(entry.getKey(), entry.getValue()); } } final SocketOptionsConfig soConfig = socketOptions != null ? socketOptions.toConfig() : null; final boolean boolPersistentConnection = getPersistentConnection() != null ? getPersistentConnection() : true; return new JmxInputConfig(getName(), getVariablesConfig(), getUrl(), getUsername(), getPassword(), getProviderPackages(), boolPersistentConnection, ignorePatterns, configConnectionProperties, soConfig); } }
@Override protected InputConfig createConfig() { List<Pattern> ignorePatterns; if (ignore != null) { ignorePatterns = new ArrayList<Pattern>(ignore.size()); for (final IgnoreObjectNameXBean ignoreObjectName : ignore) { try { ignorePatterns.add(Pattern.compile(ignoreObjectName.getRegexp())); } catch (final PatternSyntaxException e) { throw new ConfigurationException("Pattern "+ignoreObjectName+" cannot compile: " + e.getMessage()); } } } else { ignorePatterns = Collections.emptyList(); } final Map<String, String> configConnectionProperties = new HashMap<>(); if (connectionProperties != null) { for (final EntryXBean entry : connectionProperties) { configConnectionProperties.put(entry.getKey(), entry.getValue()); } } final SocketOptionsConfig soConfig = socketOptions != null ? socketOptions.toConfig() : null; final boolean boolPersistentConnection = getPersistentConnection() != null ? getPersistentConnection() : true; return new JmxInputConfig(getName(), getVariablesConfig(), getUrl(), getUsername(), getPassword(), getProviderPackages(), boolPersistentConnection, ignorePatterns, configConnectionProperties, soConfig); } }