|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jasmine.probe.manager.internal.JProbeManager
public class JProbeManager
Implements the main service of the JasmineProbe module exposing the JasmineProbeManager interface to the JasmineProbe module's clients.
| Field Summary | |
|---|---|
protected SchedulerService |
jasmineProbeScheduler
|
protected org.ow2.jonas.jmx.JmxService |
jmxService
|
protected static org.ow2.util.log.Log |
logger
|
| Constructor Summary | |
|---|---|
JProbeManager()
|
|
| Method Summary | |
|---|---|
void |
addDefaultOutput(String name)
|
void |
addProbeListener(JasmineProbeListener listener)
Register a ProbeListener in order to be notified by probe state changes. |
protected void |
bindAggregateService(JasmineAggregateService jas,
org.osgi.framework.ServiceReference sr)
|
protected void |
bindCollectorService(JasmineCollectorService jcs,
org.osgi.framework.ServiceReference sr)
|
protected void |
bindOuterService(JasmineOuterService jos,
org.osgi.framework.ServiceReference sr)
|
void |
changeIndicator(JasmineIndicator newdef)
Change an indicator. |
void |
changeOutput(JasmineOutput newdef)
Change an output. |
void |
changeProbe(JasmineProbe newdef)
Change a Probe with new parameters All parameters that are not supplied rest unchanged. |
void |
changeProbePeriod(String probeId,
int period)
Set a new value for probe period |
void |
changeTarget(JasmineTarget newdef)
Change a target. |
String |
createIndicator(JasmineIndicator newindic)
Create a new Indicator |
String |
createIndicatorInternal(JasmineIndicator newindic,
boolean check)
Create a new Indicator |
String |
createOutput(JasmineOutput newoutput)
Register a new Output in the ProbeManager A name is associated to the Output definition. |
String |
createProbe(JasmineProbe probe)
Create a new probe defined by its data |
String |
createTarget(JasmineTarget newtarget)
Create a new target |
JasmineAggregateService |
getAggregate(String key)
Return the AggregateService for a given aggregate function |
List<String> |
getAggregateFuntions()
|
JasmineCollector |
getCollector(String indicatorName,
String probeid)
Get a Collector by its Indicator name |
JasmineCollectorService |
getCollectorService(String type)
Get the CollectorService for a given type |
String |
getDomainName()
|
JasmineIndicator |
getIndicator(String name)
Get an Indicator by its name |
Set<String> |
getIndicatorCurrentUse(String name)
Get the list of probes using this indicator |
List<JasmineIndicator> |
getIndicators()
Get all the Indicator definitions in one operation. |
List<JasmineIndicator> |
getIndicators(String type)
Get the list of indicators having a given type. |
JasmineCollectorInfo |
getIndicatorTypeInfo(String type)
Get all infiormation about the type of indicator |
Set<String> |
getIndicatorTypes()
|
JasmineOuterService |
getOuterService(String type)
Get the OuterService for a given type |
JasmineOutput |
getOutput(String id)
Get an Output by its name |
Set<String> |
getOutputCurrentUse(String name)
Get the list of probes using this output |
List<JasminePropertyInfo> |
getOutputPropertyInfos(String type)
get the list of possible properties for Output, depending of its type. |
List<JasmineOutput> |
getOutputs()
Get all the Output definitions in one operation. |
List<JasmineOutput> |
getOutputs(String type)
Get the list of all outputs of a given type. |
Set<String> |
getOutputTypes()
|
JasmineProbe |
getProbe(String probeId)
Get a Probe by its name |
List<JasmineProbe> |
getProbes()
Get all the Probe definitions in one operation. |
SchedulerService |
getScheduler()
return the scheduler |
String |
getServerName()
|
JasmineTarget |
getTarget(String name)
Get a JasmineTarget by its name |
List<JasminePropertyInfo> |
getTargetPropertyInfos(String type)
get the list of possible properties for Target, depending of its type. |
List<JasmineTarget> |
getTargets()
Get all the Target definitions in one operation. |
Set<String> |
getTargetTypes()
|
String[] |
listDefaultOutputs()
|
String[] |
listIndicators(String type)
|
String[] |
listOutputs(String type)
Get the list of all outputs or of outputs having a given type |
String[] |
listProbes()
|
String[] |
listTargets()
|
void |
loadConfig(String path)
Load the specified xml configuration file The configuration will be merged with the current one. |
void |
removeAllProbes()
Remove all the managed probes. |
void |
removeDefaultOutput(String name)
|
void |
removeIndicator(String name)
remove an indicator |
void |
removeOutput(String name)
remove an output. |
void |
removeProbe(String probeId)
Remove a probe. |
void |
removeProbeListener(JasmineProbeListener listener)
Remove a ProbeListener previously registered. |
void |
removeTarget(String name)
remove a target |
void |
saveConfig(String path)
Save the current configuration in the specified xml file |
void |
setProbeState(JProbe running,
int state,
String message)
Notify a state change for that probe |
void |
start()
|
void |
startAllProbes()
Start all the managed probes. |
void |
startProbe(String probeId)
Start a probe. |
void |
stop()
|
void |
stopAllProbes()
Stop all the managed probes. |
void |
stopProbe(String probeId)
Stop a probe. |
protected void |
unbindAggregateService(JasmineAggregateService jas,
org.osgi.framework.ServiceReference sr)
|
protected void |
unbindCollectorService(JasmineCollectorService jcs,
org.osgi.framework.ServiceReference sr)
|
protected void |
unbindOuterService(JasmineOuterService jos,
org.osgi.framework.ServiceReference sr)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.ow2.util.log.Log logger
protected SchedulerService jasmineProbeScheduler
protected org.ow2.jonas.jmx.JmxService jmxService
| Constructor Detail |
|---|
public JProbeManager()
| Method Detail |
|---|
public void start()
public void stop()
protected void bindOuterService(JasmineOuterService jos,
org.osgi.framework.ServiceReference sr)
protected void unbindOuterService(JasmineOuterService jos,
org.osgi.framework.ServiceReference sr)
protected void bindCollectorService(JasmineCollectorService jcs,
org.osgi.framework.ServiceReference sr)
protected void unbindCollectorService(JasmineCollectorService jcs,
org.osgi.framework.ServiceReference sr)
protected void bindAggregateService(JasmineAggregateService jas,
org.osgi.framework.ServiceReference sr)
protected void unbindAggregateService(JasmineAggregateService jas,
org.osgi.framework.ServiceReference sr)
public SchedulerService getScheduler()
public JasmineOuterService getOuterService(String type)
public JasmineCollectorService getCollectorService(String type)
public String createProbe(JasmineProbe probe)
throws JasmineProbeException
createProbe in interface JProbeManagerMXBeanprobe - probe description
JasmineProbeException
public void removeProbe(String probeId)
throws JasmineProbeException
removeProbe in interface JProbeManagerMXBeanprobeId - probe identifier.
JasmineProbeException
public void removeAllProbes()
throws JasmineProbeException
removeAllProbes in interface JProbeManagerMXBeanJasmineProbeExceptionpublic List<JasmineProbe> getProbes()
getProbes in interface JProbeManagerMXBeanpublic String[] listProbes()
listProbes in interface JProbeManagerMXBean
public JasmineProbe getProbe(String probeId)
throws JasmineProbeException
getProbe in interface JProbeManagerMXBeanprobeId - probe identifier.
JasmineProbeException
public void startProbe(String probeId)
throws JasmineProbeException
startProbe in interface JProbeManagerMXBeanprobeId - probe identifier.
JasmineProbeException - the probe could not be started.
public void stopProbe(String probeId)
throws JasmineProbeException
stopProbe in interface JProbeManagerMXBeanprobeId - probe identifier.
JasmineProbeException - the probe could not be stopped.
public void startAllProbes()
throws JasmineProbeException
startAllProbes in interface JProbeManagerMXBeanJasmineProbeException
public void stopAllProbes()
throws JasmineProbeException
stopAllProbes in interface JProbeManagerMXBeanJasmineProbeException
public void changeProbe(JasmineProbe newdef)
throws JasmineProbeException
changeProbe in interface JProbeManagerMXBeannewdef - partial probe description
JasmineProbeException
public void changeProbePeriod(String probeId,
int period)
throws JasmineProbeException
changeProbePeriod in interface JProbeManagerMXBeanprobeId - probe identifier.period - in seconds
JasmineProbeException
public String createOutput(JasmineOutput newoutput)
throws JasmineProbeException
createOutput in interface JProbeManagerMXBeannewoutput - output description
JasmineProbeException
public void changeOutput(JasmineOutput newdef)
throws JasmineProbeException
changeOutput in interface JProbeManagerMXBeannewdef - output changes description
JasmineProbeException - is thrown if the output does not exist.
public void removeOutput(String name)
throws JasmineProbeException
removeOutput in interface JProbeManagerMXBeanname - ident of the output to remove
JasmineProbeException - is thrown if the output does not exist,
or if it is used by a running probe.public String[] listOutputs(String type)
listOutputs in interface JProbeManagerMXBeantype - the given type. If null, get all the outputs.public List<JasmineOutput> getOutputs()
getOutputs in interface JProbeManagerMXBean
public void addDefaultOutput(String name)
throws JasmineProbeException
addDefaultOutput in interface JProbeManagerMXBeanJasmineProbeExceptionpublic String[] listDefaultOutputs()
listDefaultOutputs in interface JProbeManagerMXBean
public void removeDefaultOutput(String name)
throws JasmineProbeException
removeDefaultOutput in interface JProbeManagerMXBeanJasmineProbeExceptionpublic List<JasmineOutput> getOutputs(String type)
type - the given output type
public JasmineOutput getOutput(String id)
throws JasmineProbeException
getOutput in interface JProbeManagerMXBeanid - output identifier.
JasmineProbeExceptionpublic List<JasminePropertyInfo> getOutputPropertyInfos(String type)
getOutputPropertyInfos in interface JProbeManagerMXBeantype - type of the Output (console, file, ...)
public Set<String> getOutputTypes()
getOutputTypes in interface JProbeManagerMXBean
public Set<String> getOutputCurrentUse(String name)
throws JasmineProbeException
getOutputCurrentUse in interface JProbeManagerMXBeanname - Output name
JasmineProbeException - bad parameter
public String createIndicator(JasmineIndicator newindic)
throws JasmineProbeException
createIndicator in interface JProbeManagerMXBeannewindic - indicator description
JasmineProbeException
public void changeIndicator(JasmineIndicator newdef)
throws JasmineProbeException
changeIndicator in interface JProbeManagerMXBeannewdef - indicator description
JasmineProbeException - is thrown if the indicator does not exist,
or if it is used by a running probe.
public void removeIndicator(String name)
throws JasmineProbeException
removeIndicator in interface JProbeManagerMXBeanname - ident of the indicator to remove
JasmineProbeException
public JasmineIndicator getIndicator(String name)
throws JasmineProbeException
getIndicator in interface JProbeManagerMXBeanname - indicator name.
JasmineProbeExceptionpublic List<JasmineIndicator> getIndicators()
getIndicators in interface JProbeManagerMXBeanpublic List<JasmineIndicator> getIndicators(String type)
type - the given indicator type
public String[] listIndicators(String type)
listIndicators in interface JProbeManagerMXBeanpublic JasmineCollectorInfo getIndicatorTypeInfo(String type)
getIndicatorTypeInfo in interface JProbeManagerMXBeantype - type of the Indicator (Jmx, Lewys, ...)
public Set<String> getIndicatorTypes()
getIndicatorTypes in interface JProbeManagerMXBean
public Set<String> getIndicatorCurrentUse(String name)
throws JasmineProbeException
getIndicatorCurrentUse in interface JProbeManagerMXBeanname - Indicator name
JasmineProbeException - bad parameter
public String createTarget(JasmineTarget newtarget)
throws JasmineProbeException
createTarget in interface JProbeManagerMXBeannewtarget - target description
JasmineProbeException
public void changeTarget(JasmineTarget newdef)
throws JasmineProbeException
changeTarget in interface JProbeManagerMXBeannewdef - new target description
JasmineProbeException - is thrown if the target does not exist.
public void removeTarget(String name)
throws JasmineProbeException
removeTarget in interface JProbeManagerMXBeanname - ident of the target to remove
JasmineProbeExceptionpublic String[] listTargets()
listTargets in interface JProbeManagerMXBeanpublic List<JasmineTarget> getTargets()
getTargets in interface JProbeManagerMXBeanpublic JasmineTarget getTarget(String name)
getTarget in interface JProbeManagerMXBeangetTarget in interface ProbeManagername -
public List<JasminePropertyInfo> getTargetPropertyInfos(String type)
getTargetPropertyInfos in interface JProbeManagerMXBeantype - type of the Target (jmx, ...)
public Set<String> getTargetTypes()
getTargetTypes in interface JProbeManagerMXBeanpublic 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 void saveConfig(String path)
throws JasmineProbeException
saveConfig in interface JProbeManagerMXBeanpath - the xml file, or null if saved in the default configuration file.
JasmineProbeException
public void loadConfig(String path)
throws JasmineProbeException
loadConfig in interface JProbeManagerMXBeanpath - the xml file.
JasmineProbeException
public JasmineCollector getCollector(String indicatorName,
String probeid)
throws JasmineProbeException
getCollector in interface ProbeManagerprobeid - indicatorName - indicator name
JasmineProbeExceptionpublic List<String> getAggregateFuntions()
getAggregateFuntions in interface ProbeManagerpublic JasmineAggregateService getAggregate(String key)
getAggregate in interface ProbeManagerkey - the aggregate function that is searched
public String getDomainName()
getDomainName in interface ProbeManagerpublic String getServerName()
getServerName in interface ProbeManager
public String createIndicatorInternal(JasmineIndicator newindic,
boolean check)
throws JasmineProbeException
newindic - indicator descriptioncheck - true if check properties against the Collector (that should be there)
JasmineProbeException
public void setProbeState(JProbe running,
int state,
String message)
running - probestate - See JasmineProbe.statemessage - Error message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||