|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ow2.jasmine.monitoring.mbeancmd.osgi.internal.ProbeServiceImpl
public class ProbeServiceImpl
This class exposes an OSGi service bundle that implements the JasmineProbeManager interface. It reads its configuration in a probe-config.xml file. Called today by the jasmine-eos module ProbeManager. It replaces the former part embedded in the jasmine eventswitch.
| Constructor Summary | |
|---|---|
ProbeServiceImpl(org.osgi.framework.BundleContext bc)
Inject the BundleContext in the IPojo |
|
| Method Summary | |
|---|---|
void |
addProbeListener(JasmineProbeListener listener)
Register a ProbeListener in order to be notified by probe state changes. |
void |
changeOutput(JasmineOutput newoutput)
|
void |
changeProbe(JasmineProbe newprobe)
|
void |
changeTarget(JasmineTarget newtarget)
|
void |
createOutput(JasmineOutput newoutput)
Create a new Output |
int |
createProbe(JasmineProbe probe)
Create a Probe defined by a JasmineProbe object value |
void |
createTarget(JasmineTarget newtarget)
Create a new Target |
JasmineOutput |
findOutput(java.lang.String name)
Get an OutputProbe by its Id |
JasmineTarget |
findTarget(java.lang.String targetId)
Get a TargetProbe by its Id |
java.util.Set<javax.management.ObjectName> |
getMBeans(JasmineTarget jt,
java.lang.String pattern)
Get the list of mbeans matching a pattern for this target. |
java.util.Collection<JasmineOutput> |
getOutputs()
|
java.util.Collection<JasmineProbe> |
getProbes()
|
java.util.Collection<JasmineTarget> |
getTargets()
|
void |
loadConfig(java.lang.String path)
Load configuration from the specified file |
void |
publishChange(JasmineProbe probe)
|
void |
removeAllProbes()
Remove all probes |
void |
removeOutput(java.lang.String name)
remove an output |
void |
removeProbe(int probeId)
|
void |
removeProbeListener(JasmineProbeListener listener)
Unregister a ProbeListener |
void |
removeTarget(java.lang.String name)
remove an target |
void |
saveConfig(java.lang.String path)
Save back configuration in probe-config.xml |
void |
start()
Read the configuration when module is set. |
void |
startAllProbes()
Start all the probes Continues starting probe even if one is in error (maybe already started) |
void |
startProbe(int probeId)
|
void |
stop()
module is invalidated. |
void |
stopAllProbes()
Stop all the probes Continues stopping probe even if one is in error |
void |
stopProbe(int probeId)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProbeServiceImpl(org.osgi.framework.BundleContext bc)
bc - | Method Detail |
|---|
public void start()
public void stop()
public void createOutput(JasmineOutput newoutput)
throws JasmineProbeException
createOutput in interface JasmineProbeManagernewoutput - output description
JasmineProbeException
public void changeOutput(JasmineOutput newoutput)
throws JasmineProbeException
changeOutput in interface JasmineProbeManagerJasmineProbeException
public void removeOutput(java.lang.String name)
throws JasmineProbeException
removeOutput in interface JasmineProbeManagername - ident of the output to remove
JasmineProbeExceptionpublic JasmineOutput findOutput(java.lang.String name)
findOutput in interface JasmineProbeManagername - ident of the output
public java.util.Collection<JasmineOutput> getOutputs()
throws JasmineProbeException
getOutputs in interface JasmineProbeManagerJasmineProbeException
public void createTarget(JasmineTarget newtarget)
throws JasmineProbeException
createTarget in interface JasmineProbeManagernewtarget - target description
JasmineProbeException
public void changeTarget(JasmineTarget newtarget)
throws JasmineProbeException
changeTarget in interface JasmineProbeManagerJasmineProbeException
public void removeTarget(java.lang.String name)
throws JasmineProbeException
removeTarget in interface JasmineProbeManagername - ident of the target to remove
JasmineProbeExceptionpublic JasmineTarget findTarget(java.lang.String targetId)
findTarget in interface JasmineProbeManagertargetId - ident of the targetpublic java.util.Collection<JasmineTarget> getTargets()
getTargets in interface JasmineProbeManager
public int createProbe(JasmineProbe probe)
throws JasmineProbeException
createProbe in interface JasmineProbeManagerprobe - the object value
JasmineProbeException
public void changeProbe(JasmineProbe newprobe)
throws JasmineProbeException
changeProbe in interface JasmineProbeManagerJasmineProbeException
public void removeProbe(int probeId)
throws JasmineProbeException
removeProbe in interface JasmineProbeManagerJasmineProbeException
public void removeAllProbes()
throws JasmineProbeException
removeAllProbes in interface JasmineProbeManagerJasmineProbeException
public void startProbe(int probeId)
throws JasmineProbeException
startProbe in interface JasmineProbeManagerJasmineProbeException
public void stopProbe(int probeId)
throws JasmineProbeException
stopProbe in interface JasmineProbeManagerJasmineProbeException
public void stopAllProbes()
throws JasmineProbeException
stopAllProbes in interface JasmineProbeManagerJasmineProbeException
public void startAllProbes()
throws JasmineProbeException
startAllProbes in interface JasmineProbeManagerJasmineProbeExceptionpublic java.util.Collection<JasmineProbe> getProbes()
getProbes in interface JasmineProbeManager
public void saveConfig(java.lang.String path)
throws JasmineProbeException
saveConfig in interface JasmineProbeManagerpath - LATER: path where configuration will be saved.
JasmineProbeException
public void loadConfig(java.lang.String path)
throws JasmineProbeException
loadConfig in interface JasmineProbeManagerpath - File where config will be loaded
JasmineProbeExceptionpublic void addProbeListener(JasmineProbeListener listener)
addProbeListener in interface JasmineProbeManagerlistener - object that treats the probe state changepublic void removeProbeListener(JasmineProbeListener listener)
removeProbeListener in interface JasmineProbeManagerlistener - object that treats the probe state change
public java.util.Set<javax.management.ObjectName> getMBeans(JasmineTarget jt,
java.lang.String pattern)
throws JasmineProbeException
getMBeans in interface JasmineProbeManagerjt - The JasmineTargetpattern - ObjectName pattern
JasmineProbeExceptionpublic void publishChange(JasmineProbe probe)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||