org.ow2.jasmine.monitoring.mbeancmd.api
Interface JasmineProbeManager


public interface JasmineProbeManager

Interface for JASMINe Probe Manager.

Author:
danesa

Method Summary
 void addProbeListener(JasmineProbeListener listener)
          Register a ProbeListener in order to be notified by probe state changes.
 void changeOutput(JasmineOutput output)
          Change an output.
 void changeProbe(JasmineProbe probe)
          Change a Probe with new parameters The Probe must be of the same type (stat/poll)
 void changeTarget(JasmineTarget target)
          Recreate a target with a given name.
 void createOutput(JasmineOutput output)
          Create a new Output
 int createProbe(JasmineProbe probe)
          Create a new probe defined by its data
 void createTarget(JasmineTarget target)
          Create a target with a given name.
 JasmineOutput findOutput(java.lang.String name)
          Return the output definition corresponding to an output name.
 JasmineTarget findTarget(java.lang.String targetName)
          Return a target object identified by its name.
 java.util.Set<javax.management.ObjectName> getMBeans(JasmineTarget target, java.lang.String pattern)
          Get the list of mbeans matching a pattern for this target.
 java.util.Collection<JasmineOutput> getOutputs()
          get the list of all defined outputs.
 java.util.Collection<JasmineProbe> getProbes()
           
 java.util.Collection<JasmineTarget> getTargets()
          get the list of all defined targets.
 void loadConfig(java.lang.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 removeOutput(java.lang.String name)
          remove an output
 void removeProbe(int id)
          Remove a probe.
 void removeTarget(java.lang.String name)
          remove an target
 void saveConfig(java.lang.String path)
          Save the current configuration in the specified xml file
 void startAllProbes()
          Start all the managed probes.
 void startProbe(int id)
          Start a probe.
 void stopAllProbes()
          Stop all the managed probes.
 void stopProbe(int id)
          Stop a probe.
 

Method Detail

createProbe

int createProbe(JasmineProbe probe)
                throws JasmineProbeException
Create a new probe defined by its data

Parameters:
probe - probe description
Returns:
the Id to be used to reference this probe later.
Throws:
JasmineProbeException

changeProbe

void changeProbe(JasmineProbe probe)
                 throws JasmineProbeException
Change a Probe with new parameters The Probe must be of the same type (stat/poll)

Parameters:
probe - probe description
Throws:
JasmineProbeException

removeProbe

void removeProbe(int id)
                 throws JasmineProbeException
Remove a probe.

Parameters:
id - probe identifier.
Throws:
JasmineProbeException

startProbe

void startProbe(int id)
                throws JasmineProbeException
Start a probe.

Parameters:
id - probe identifier.
Throws:
JasmineProbeException - the probe could not be started.

stopProbe

void stopProbe(int id)
               throws JasmineProbeException
Stop a probe.

Parameters:
id - probe identifier.
Throws:
JasmineProbeException - the probe could not be stopped.

startAllProbes

void startAllProbes()
                    throws JasmineProbeException
Start all the managed probes.

Throws:
JasmineProbeException

stopAllProbes

void stopAllProbes()
                   throws JasmineProbeException
Stop all the managed probes.

Throws:
JasmineProbeException

removeAllProbes

void removeAllProbes()
                     throws JasmineProbeException
Remove all the managed probes.

Throws:
JasmineProbeException

getProbes

java.util.Collection<JasmineProbe> getProbes()
Returns:
all the probe definitions

addProbeListener

void addProbeListener(JasmineProbeListener listener)
Register a ProbeListener in order to be notified by probe state changes. Maybe other events will be considered...

Parameters:
listener - object that treats the probe state change

createTarget

void createTarget(JasmineTarget target)
                  throws JasmineProbeException
Create a target with a given name. The name must be unique, otherwise an exception is thrown.

Parameters:
target - the Target definition
Throws:
JasmineProbeException - is thrown if the targetName is already in use and ...

changeTarget

void changeTarget(JasmineTarget target)
                  throws JasmineProbeException
Recreate a target with a given name. The name must exist, otherwise an exception is thrown. The target must not be used by a probe, otherwise an exception is thrown.

Parameters:
target - the Target definition
Throws:
JasmineProbeException - is thrown if the targetName doesn't exist or if the target is used by a running probe.

findTarget

JasmineTarget findTarget(java.lang.String targetName)
Return a target object identified by its name.

Parameters:
targetName - a target name
Returns:
the target definition or null if does not exist.

getTargets

java.util.Collection<JasmineTarget> getTargets()
                                               throws JasmineProbeException
get the list of all defined targets.

Returns:
List of the targets
Throws:
JasmineProbeException - ...

removeTarget

void removeTarget(java.lang.String name)
                  throws JasmineProbeException
remove an target

Parameters:
name - that identify the target to remove
Throws:
JasmineProbeException

createOutput

void createOutput(JasmineOutput output)
                  throws JasmineProbeException
Create a new Output

Parameters:
output - output description
Throws:
JasmineProbeException

changeOutput

void changeOutput(JasmineOutput output)
                  throws JasmineProbeException
Change an output. The output must exist, otherwise an exception is thrown. The output must not be used by a probe, otherwise an exception is thrown.

Parameters:
output - output description
Throws:
JasmineProbeException - is thrown if the output does not exist, or if it is used by a running probe.

findOutput

JasmineOutput findOutput(java.lang.String name)
Return the output definition corresponding to an output name.

Parameters:
name - output name
Returns:
the output definition or null if does not exist.

removeOutput

void removeOutput(java.lang.String name)
                  throws JasmineProbeException
remove an output

Parameters:
name - ident of the output to remove
Throws:
JasmineProbeException

getOutputs

java.util.Collection<JasmineOutput> getOutputs()
                                               throws JasmineProbeException
get the list of all defined outputs.

Returns:
List of the outputs
Throws:
JasmineProbeException

saveConfig

void saveConfig(java.lang.String path)
                throws JasmineProbeException
Save the current configuration in the specified xml file

Parameters:
path - the xml file, or null if saved in the default configuration file.
Throws:
JasmineProbeException

loadConfig

void loadConfig(java.lang.String path)
                throws JasmineProbeException
Load the specified xml configuration file The configuration will be merged with the current one.

Parameters:
path - the xml file, or null if load the default configuration file.
Throws:
JasmineProbeException

getMBeans

java.util.Set<javax.management.ObjectName> getMBeans(JasmineTarget target,
                                                     java.lang.String pattern)
                                                     throws JasmineProbeException
Get the list of mbeans matching a pattern for this target.

Parameters:
target - The JasmineTarget
pattern - ObjectName pattern
Returns:
Set of ObjectName
Throws:
JasmineProbeException


Copyright © 2011 OW2 Consortium. All Rights Reserved.