org.ow2.jasmine.monitoring.mbeancmd.osgi.internal
Class JProbeCommandDispatcher
java.lang.Object
org.ow2.jasmine.monitoring.mbeancmd.CommandDispatcher
org.ow2.jasmine.monitoring.mbeancmd.osgi.internal.JProbeCommandDispatcher
public class JProbeCommandDispatcher
- extends org.ow2.jasmine.monitoring.mbeancmd.CommandDispatcher
Avoids modifications in mbeancmd standalone.
This class should be removed when JasmineProbe 3.0 is available.
- Author:
- durieuxp
| Nested classes/interfaces inherited from class org.ow2.jasmine.monitoring.mbeancmd.CommandDispatcher |
org.ow2.jasmine.monitoring.mbeancmd.CommandDispatcher.CommandStatus |
| Fields inherited from class org.ow2.jasmine.monitoring.mbeancmd.CommandDispatcher |
cmd, logger |
|
Method Summary |
protected java.io.InputStreamReader |
getInputStreamReader(java.lang.String name)
Return an inputStreamReader for the specified resource, by using the bundle context. |
protected java.lang.Class<?> |
loadClass(java.lang.String cname)
Load and return a class for a given class name, by using the bundle context. |
static void |
removeContext()
Delete the reference to the bundle context. |
static void |
setContext(org.osgi.framework.BundleContext c)
Set a bundle context |
static int |
start(java.lang.String[] args,
JProbeCmdThread cmd)
Overwrite the start method to instanciate this class
in place of the standard mbeancmd one. |
| Methods inherited from class org.ow2.jasmine.monitoring.mbeancmd.CommandDispatcher |
getAvailableCommands, getCommand, init, isEmbedded, main, setEmbedded, setFailed, setFailed, setRunning, setStarted, setStopped, start, stopCommand |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JProbeCommandDispatcher
public JProbeCommandDispatcher()
setContext
public static void setContext(org.osgi.framework.BundleContext c)
- Set a bundle context
- Parameters:
context - bundle context
removeContext
public static void removeContext()
- Delete the reference to the bundle context.
start
public static int start(java.lang.String[] args,
JProbeCmdThread cmd)
- Overwrite the start method to instanciate this class
in place of the standard mbeancmd one.
- Parameters:
args - Arguments of the command, including the command itself at the
first position.
- Returns:
- 0 if succeeded, an error code otherwise.
getInputStreamReader
protected java.io.InputStreamReader getInputStreamReader(java.lang.String name)
throws java.io.IOException
- Return an inputStreamReader for the specified resource, by using the bundle context.
- Overrides:
getInputStreamReader in class org.ow2.jasmine.monitoring.mbeancmd.CommandDispatcher
- Parameters:
name - the resource name
- Returns:
- an inputStreamReader for the specified resource
- Throws:
java.io.IOException - if an I/O exception occurs
loadClass
protected java.lang.Class<?> loadClass(java.lang.String cname)
throws java.lang.ClassNotFoundException
- Load and return a class for a given class name, by using the bundle context.
- Overrides:
loadClass in class org.ow2.jasmine.monitoring.mbeancmd.CommandDispatcher
- Parameters:
cname - a class name
- Returns:
- a loaded class for a given class name
- Throws:
java.lang.ClassNotFoundException - if the class cannot be found
Copyright © 2011 OW2 Consortium. All Rights Reserved.