Brooklyn

brooklyn.entity.java
[Java] Class JavaSoftwareProcessSshDriver

java.lang.Object
  brooklyn.entity.basic.AbstractSoftwareProcessDriver
      brooklyn.entity.basic.AbstractSoftwareProcessSshDriver
          brooklyn.entity.java.JavaSoftwareProcessSshDriver
All Implemented Interfaces:
JavaSoftwareProcessDriver

public abstract class JavaSoftwareProcessSshDriver
extends AbstractSoftwareProcessSshDriver

The SSH implementation of the JavaSoftwareProcessDriver.


Field Summary
static java.util.List KEY_VAL_OPT_PREFIXES

static java.util.List MUTUALLY_EXCLUSIVE_OPTS

static Logger log

 
Fields inherited from class AbstractSoftwareProcessSshDriver
BROOKLYN_HOME_DIR, CHECK_RUNNING, CUSTOMIZING, DEFAULT_INSTALL_BASEDIR, DEFAULT_RUN_BASEDIR, IGNORE_ENTITY_SSH_FLAGS, INSTALLING, KILLING, LAUNCHING, NO_VERSION_INFO, PID_FILENAME, RESTARTING, STOPPING, USE_PID_FILE, log, logSsh
 
Fields inherited from class AbstractSoftwareProcessDriver
entity, location, resource
 
Constructor Summary
JavaSoftwareProcessSshDriver(EntityLocal entity, SshMachineLocation machine)

 
Method Summary
void checkJavaHostnameBug()

protected java.util.List getCustomJavaConfigOptions()

@deprecated since 0.6.0, the config key is always used instead of this

protected java.util.Map getCustomJavaSystemProperties()

Return extra Java system properties (-D defines) used by the application.

java.util.List getJavaOpts()

arguments to pass to the JVM; this is the config options (e.g.

protected java.util.Map getJavaSystemProperties()

Returns the complete set of Java system properties (-D defines) to set for the application.

java.lang.String getJmxContext()

protected java.util.List getJmxJavaConfigOptions()

Return any JVM arguments required, other than the -D defines returned by getJmxJavaSystemProperties()

protected java.util.Map getJmxJavaSystemProperties()

java.lang.Integer getJmxPort()

@deprecated since 0.4.0, see getRmiRegistryPort()

protected java.lang.String getLogFileLocation()

java.lang.Integer getRmiPort()

@deprecated since 0.4.0, see getRmiRegistryPort()

java.lang.Integer getRmiRegistryPort()

@deprecated since 0.6.0, the config key is always used instead of this

java.lang.Integer getRmiServerPort()

@deprecated since 0.6.0, the config key is always used instead of this

java.util.Map getShellEnvironment()

Sets all JVM options (-X..

boolean installJava()

void installJmxSupport()

boolean isJmxEnabled()

boolean isJmxSslEnabled()

void start()

 
Methods inherited from class AbstractSoftwareProcessSshDriver
copyFile, copyFile, copyFile, copyResource, copyResource, copyResource, copyResources, copyTemplate, copyTemplate, copyTemplate, copyTemplates, execute, execute, getAddress, getDefaultVersion, getDownloadFileSuffix, getDownloadFilename, getEntityVersionLabel, getEntityVersionLabel, getHostname, getInstallDir, getLocation, getMachine, getPortsUsed, getRunDir, getShellEnvironment, getSshFlags, getVersion, newScript, newScript
 
Methods inherited from class AbstractSoftwareProcessDriver
customize, doFullStartOnRestart, getEntity, getLocation, getResource, getResourceAsString, install, kill, launch, postLaunch, processTemplate, processTemplate, processTemplate, processTemplate, processTemplateContents, processTemplateContents, rebind, restart, start, stop, waitForConfigKey
 

Field Detail

KEY_VAL_OPT_PREFIXES

public static final java.util.List KEY_VAL_OPT_PREFIXES


MUTUALLY_EXCLUSIVE_OPTS

public static final java.util.List MUTUALLY_EXCLUSIVE_OPTS


log

public static final Logger log


 
Constructor Detail

JavaSoftwareProcessSshDriver

public JavaSoftwareProcessSshDriver(EntityLocal entity, SshMachineLocation machine)


 
Method Detail

checkJavaHostnameBug

public void checkJavaHostnameBug()


getCustomJavaConfigOptions

protected java.util.List getCustomJavaConfigOptions()
deprecated:
since 0.6.0, the config key is always used instead of this


getCustomJavaSystemProperties

protected java.util.Map getCustomJavaSystemProperties()
Return extra Java system properties (-D defines) used by the application. Override as needed; default is an empty map.


getJavaOpts

public java.util.List getJavaOpts()
arguments to pass to the JVM; this is the config options (e.g. -Xmx1024; only the contents of getCustomJavaConfigOptions() by default) and java system properties (-Dk=v; add custom properties in getCustomJavaSystemProperties())

See getShellEnvironment() for discussion of quoting/escaping strategy.


getJavaSystemProperties

protected java.util.Map getJavaSystemProperties()
Returns the complete set of Java system properties (-D defines) to set for the application.

This is exposed to the JVM as the contents of the JAVA_OPTS environment variable. Default set contains config key, custom system properties, and JMX defines.

Null value means to set -Dkey otherwise it is -Dkey=value.

See getShellEnvironment() for discussion of quoting/escaping strategy.


getJmxContext

able when calling the
public java.lang.String getJmxContext()


getJmxJavaConfigOptions

protected java.util.List getJmxJavaConfigOptions()
Return any JVM arguments required, other than the -D defines returned by getJmxJavaSystemProperties()


getJmxJavaSystemProperties

protected java.util.Map getJmxJavaSystemProperties()


getJmxPort

}
public java.lang.Integer getJmxPort()
deprecated:
since 0.4.0, see getRmiRegistryPort()


getLogFileLocation

protected java.lang.String getLogFileLocation()


getRmiPort

}
public java.lang.Integer getRmiPort()
deprecated:
since 0.4.0, see getRmiRegistryPort()


getRmiRegistryPort

}
public java.lang.Integer getRmiRegistryPort()
deprecated:
since 0.6.0, the config key is always used instead of this


getRmiServerPort

}
public java.lang.Integer getRmiServerPort()
deprecated:
since 0.6.0, the config key is always used instead of this


getShellEnvironment

@Override
public java.util.Map getShellEnvironment()
Sets all JVM options (-X.. -D..) in an environment var JAVA_OPTS.

That variable is constructed from getJavaOpts(), then wrapped _unescaped_ in double quotes. An error is thrown if there is an unescaped double quote in the string. All other unescaped characters are permitted, but unless $var expansion or `command` execution is desired (although this is not confirmed as supported) the generally caller should escape any such characters, for example using BashStringEscapes#escapeLiteralForDoubleQuotedBash(String)#escapeLiteralForDoubleQuotedBash(String).


installJava

public boolean installJava()


installJmxSupport

public void installJmxSupport()


isJmxEnabled

public boolean isJmxEnabled()


isJmxSslEnabled

public boolean isJmxSslEnabled()


start

public void start()


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.