public void validate() { notEmpty(this, "key", getKey()); } }
public void validate() { if (entries != null) { for (final EntryXBean entry : entries) { entry.validate(); } } } }
public void validate() { notEmpty(this, "key", getKey()); } }
public void validate() { if (entries != null) { for (final EntryXBean entry : entries) { entry.validate(); } } } }
@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); } }