public synchronized PrivateKey getJmxAccessKey() { PrivateKey key = jmxSupport.getConfig(UsesJmx.JMX_SSL_ACCESS_KEY); if (key!=null) return key; getJmxAccessCert(); return jmxSupport.getConfig(UsesJmx.JMX_SSL_ACCESS_KEY); }
public boolean isJmx() { init(); return isJmx; }
public void installJmxSupport() { if (isJmxEnabled()) { newScript("JMX_SETUP_PREINSTALL").body.append("mkdir -p "+getRunDir()).execute(); new JmxSupport(getEntity(), getRunDir()).install(); } }
/** * Return any JVM arguments required, other than the -D defines returned by {@link #getJmxJavaSystemProperties()} */ protected List<String> getJmxJavaConfigOptions() { List<String> result = new ArrayList<String>(); if (isJmxEnabled()) { result.addAll(new JmxSupport(getEntity(), getRunDir()).getJmxJavaConfigOptions()); } return result; }
@Override protected void connectSensors() { super.connectSensors(); ConfigToAttributes.apply(this); if ( ((VanillaJavaAppDriver)getDriver()).isJmxEnabled() ) { jmxPollPeriod = (jmxPollPeriod > 0) ? jmxPollPeriod : 500; jmxFeed = JavaAppUtils.connectMXBeanSensors(this, jmxPollPeriod); } connectServiceUpIsRunning(); }
@Override protected Map getCustomJavaSystemProperties() { VanillaJavaApp entity = getEntity(); Map result = new HashMap(); result.putAll(super.getCustomJavaSystemProperties()); result.putAll(entity.getJvmDefines()); return result; }
public static void connectJavaAppServerPolicies(EntityLocal entity) { connectJavaAppServerPolicies(entity, Duration.TEN_SECONDS); } public static void connectJavaAppServerPolicies(EntityLocal entity, Duration windowPeriod) {
@SuppressWarnings("unchecked") public static JmxFeed connectMXBeanSensors(EntityLocal entity) { return connectMXBeanSensors(entity, Duration.FIVE_SECONDS); }
@Override protected List<String> getCustomJavaConfigOptions() { VanillaJavaApp entity = getEntity(); List<String> result = new LinkedList<String>(); result.addAll(super.getCustomJavaConfigOptions()); result.addAll(entity.getJvmXArgs()); return result; } }
@Override public BrooklynNodeImpl getEntity() { return (BrooklynNodeImpl) super.getEntity(); }
public List<String> getClasspath() { return getConfig(CLASSPATH); } public Map getJvmDefines() { return getConfig(JVM_DEFINES); }
protected JmxmpSslSupport getJmxSslSupport() { return new JmxmpSslSupport(this); }
public VanillaJavaApp getEntity() { return (VanillaJavaApp) super.getEntity(); }
public Map getJvmDefines() { return getConfig(JVM_DEFINES); } public List getJvmXArgs() { return getConfig(JVM_XARGS); }
public JmxAgentModes getJmxAgentMode() { init(); if (jmxAgentMode==null) return JmxAgentModes.NONE; return jmxAgentMode; }
public JavaWebAppSoftwareProcessImpl getEntity() { return (JavaWebAppSoftwareProcessImpl) super.getEntity(); }
public String getMainClass() { return getConfig(MAIN_CLASS); } public List<String> getClasspath() { return getConfig(CLASSPATH); }
public boolean isSecure() { init(); if (isSecure==null) return false; return isSecure; }
public List getJvmXArgs() { return getConfig(JVM_XARGS); }