|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.console.command.AbstractCommand
org.apache.activemq.console.command.AbstractJmxCommand
public abstract class AbstractJmxCommand
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_JMX_URL
|
Fields inherited from class org.apache.activemq.console.command.AbstractCommand |
---|
COMMAND_OPTION_DELIMETER, context |
Constructor Summary | |
---|---|
AbstractJmxCommand()
|
Method Summary | |
---|---|
protected void |
closeJmxConnection()
Close the current JMX connector |
protected javax.management.MBeanServerConnection |
createJmxConnection()
|
void |
execute(java.util.List<java.lang.String> tokens)
Execute a generic command, which includes parsing the options for the command and running the specific task. |
protected java.lang.String |
findJMXUrlByProcessId(int pid)
Finds the JMX Url for a VM by its process id |
java.lang.String |
getJmxPassword()
Get the password used when authenticating |
protected javax.management.remote.JMXServiceURL |
getJmxServiceUrl()
Get the current specified JMX service url. |
java.lang.String |
getJmxUser()
Get the JMX user name to be used when authenticating. |
static java.lang.String |
getJVM()
|
protected void |
handleOption(java.lang.String token,
java.util.List<java.lang.String> tokens)
Handle the --jmxurl option. |
boolean |
isJmxUseLocal()
Get whether the default mbean server for this JVM should be used instead of the jmx url |
static boolean |
isSunJVM()
|
void |
setJmxPassword(java.lang.String jmxPassword)
Sets the password to use when authenticating |
protected void |
setJmxServiceUrl(javax.management.remote.JMXServiceURL jmxServiceUrl)
Sets the JMX service url to use. |
protected void |
setJmxServiceUrl(java.lang.String jmxServiceUrl)
Sets the JMX service url to use. |
void |
setJmxUseLocal(boolean jmxUseLocal)
Sets whether the the default mbean server for this JVM should be used instead of the jmx url |
void |
setJmxUser(java.lang.String jmxUser)
Sets the JMS user name to use |
protected javax.management.remote.JMXServiceURL |
useJmxServiceUrl()
Get the current JMX service url being used, or create a default one if no JMX service url has been specified. |
Methods inherited from class org.apache.activemq.console.command.AbstractCommand |
---|
parseOptions, printHelp, runTask, setCommandContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String DEFAULT_JMX_URL
Constructor Detail |
---|
public AbstractJmxCommand()
Method Detail |
---|
protected javax.management.remote.JMXServiceURL getJmxServiceUrl()
public static java.lang.String getJVM()
public static boolean isSunJVM()
protected java.lang.String findJMXUrlByProcessId(int pid)
pid
- The process id value of the VM to search for.
protected javax.management.remote.JMXServiceURL useJmxServiceUrl() throws java.net.MalformedURLException
java.net.MalformedURLException
protected void setJmxServiceUrl(javax.management.remote.JMXServiceURL jmxServiceUrl)
jmxServiceUrl
- - new JMX service url to useprotected void setJmxServiceUrl(java.lang.String jmxServiceUrl) throws java.net.MalformedURLException
jmxServiceUrl
- - new JMX service url to use
java.net.MalformedURLException
public java.lang.String getJmxUser()
public void setJmxUser(java.lang.String jmxUser)
jmxUser
- - the jmxpublic java.lang.String getJmxPassword()
public void setJmxPassword(java.lang.String jmxPassword)
jmxPassword
- - the password used for JMX authenticationpublic boolean isJmxUseLocal()
true
if the mbean server from this JVM should be used, false if the jmx url should be used
public void setJmxUseLocal(boolean jmxUseLocal)
jmxUseLocal
- - true
if the mbean server from this JVM should be used, false if the jmx url should be used
protected void closeJmxConnection()
protected javax.management.MBeanServerConnection createJmxConnection() throws java.io.IOException
java.io.IOException
protected void handleOption(java.lang.String token, java.util.List<java.lang.String> tokens) throws java.lang.Exception
handleOption
in class AbstractCommand
token
- - option token to handletokens
- - succeeding command arguments
java.lang.Exception
public void execute(java.util.List<java.lang.String> tokens) throws java.lang.Exception
AbstractCommand
execute
in interface Command
execute
in class AbstractCommand
tokens
- - command arguments
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |