public JmxConnectionConfigBuilder withUsername(String username) { config.setUsername(username); return this; }
public String[] getCredentials() { if (isSunCacao()) { return new String[]{"com.sun.cacao.user\001" + getUsername(), getPassword()}; } return new String[]{getUsername(), getPassword()}; }
private JmxConnectionConfigBuilder withSunCacao(boolean sunCacao) { config.setSunCacao(sunCacao); return this; }
@Override public JmxServerConnectionWrapper createConnection(final InetAddress ipAddress, final Map<String, String> propertiesMap) throws JmxServerConnectionException { JmxConnectionConfig config = JmxConnectionConfigBuilder.buildFrom(ipAddress, propertiesMap).build(); return createConnection(config); }
public boolean hasCredentials() { return getUsername() != null && getPassword() != null; }
public PasswordStrategy getPasswordStategy() { if ("PASSWORD_CLEAR".equals(getFactory())) { return PasswordStrategy.PASSWORD_CLEAR; } if ("SASL".equals(getFactory())) { return PasswordStrategy.SASL; } return PasswordStrategy.STANDARD; }
public JmxConnectionConfigBuilder withUrl(String url) { config.setUrl(url); return this; }
public JmxConnectionConfigBuilder withFactory(String factory) { config.setFactory(factory); return this; }
private JmxConnectionConfigBuilder withPort(String port) { config.setPort(port); return this; }
public JmxConnectionConfigBuilder withIpAddress(InetAddress ipAddress) { config.setIpAddress(ipAddress); return this; }
public JmxConnectionConfigBuilder withPassword(String password) { config.setPassword(password); return this; }
public String[] getCredentials() { if (isSunCacao()) { return new String[]{"com.sun.cacao.user\001" + getUsername(), getPassword()}; } return new String[]{getUsername(), getPassword()}; }
public boolean hasCredentials() { return getUsername() != null && getPassword() != null; }
public JmxConnectionConfigBuilder withUsername(String username) { config.setUsername(username); return this; }
private JmxConnectionConfigBuilder withSunCacao(boolean sunCacao) { config.setSunCacao(sunCacao); return this; }
public JmxConnectionConfigBuilder withUrl(String url) { config.setUrl(url); return this; }
public JmxConnectionConfigBuilder withFactory(String factory) { config.setFactory(factory); return this; }
private JmxConnectionConfigBuilder withPort(String port) { config.setPort(port); return this; }
public JmxConnectionConfigBuilder withIpAddress(InetAddress ipAddress) { config.setIpAddress(ipAddress); return this; }
public JmxConnectionConfigBuilder withPassword(String password) { config.setPassword(password); return this; }