|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hyperic.hq.measurement.server.session.SessionEJB
org.hyperic.hq.measurement.server.session.MeasurementManagerEJBImpl
public class MeasurementManagerEJBImpl
The MeasurementManager provides APIs to deal with Measurement objects.
| Field Summary |
|---|
| Fields inherited from class org.hyperic.hq.measurement.server.session.SessionEJB |
|---|
_mpm, DATASOURCE_NAME |
| Constructor Summary | |
|---|---|
MeasurementManagerEJBImpl()
|
|
| Method Summary | |
|---|---|
void |
buildMeasurementEvent(MeasurementEvent event)
Initializes the units and resource properties of a measurement event |
void |
checkConfiguration(AuthzSubject subject,
AppdefEntityID entity,
ConfigResponse config)
Check a configuration to see if it returns DSNs which the agent can use to successfully monitor an entity. |
java.util.List |
createMeasurements(AppdefEntityID id,
java.lang.Integer[] templates,
long[] intervals,
ConfigResponse props)
Create Measurement objects based their templates |
java.util.List |
createMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.Integer[] templates,
ConfigResponse props)
Create Measurement objects based their templates and default intervals |
java.util.List |
createMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.Integer[] templates,
long[] intervals,
ConfigResponse props)
Create Measurements and enqueue for scheduling after commit |
void |
disableMeasurements(AuthzSubject subject,
Agent agent,
AppdefEntityID[] ids,
boolean isAsyncDelete)
Disable all measurements for the given resources. |
void |
disableMeasurements(AuthzSubject subject,
AppdefEntityID id)
Disable all Measurements for a resource |
void |
disableMeasurements(AuthzSubject subject,
AppdefEntityID agentId,
AppdefEntityID[] ids)
Disable all measurements for the given resources. |
void |
disableMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.Integer[] tids)
Disable measurements for an instance Enqueues reschedule events after commit |
void |
disableMeasurements(AuthzSubject subject,
Resource res)
Disable all Measurements for a resource |
void |
disableMeasurements(AuthzSubject subject,
Resource res,
boolean isAsyncDelete)
Disable all Measurements for a resource |
void |
ejbActivate()
|
void |
ejbCreate()
|
void |
ejbPassivate()
|
void |
ejbPostCreate()
|
void |
ejbRemove()
|
void |
enableDefaultMeasurements(AuthzSubject subj,
Resource r)
Enable the default on metrics for a given resource, enqueue for scheduling after commit |
void |
enableMeasurement(AuthzSubject subject,
java.lang.Integer mId,
long interval)
Enable the Measurement and enqueue for scheduling after commit |
void |
enableMeasurements(AuthzSubject subject,
AppdefEntityID[] aeids,
java.lang.Integer[] mtids,
long interval)
Set the interval of Measurements based their template ID's Enable Measurements and enqueue for scheduling after commit |
void |
enableMeasurements(AuthzSubject subject,
java.lang.Integer[] mids)
Enable a collection of metrics, enqueue for scheduling after commit |
java.util.List |
findAgentOffsetTuples()
Find a list of tuples (of size 4) consisting of the Agent
the Platform it manages
the Server representing the Agent
the Measurement that contains the Server Offset value |
java.util.List |
findAllEnabledMeasurementsAndTemplates()
|
java.util.List |
findDesignatedMeasurements(AppdefEntityID id)
Look up a List of designated Measurements for an entity |
java.util.Map |
findDesignatedMeasurements(AuthzSubject subject,
AppdefEntityID[] ids,
java.lang.String cat)
Look up a Map of Measurements for a Category XXX: This method needs to be re-thought. |
java.util.List |
findDesignatedMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.String cat)
Look up a list of designated Measurements for an entity for a category |
java.util.List |
findDesignatedMeasurements(AuthzSubject subject,
ResourceGroup g,
java.lang.String cat)
Look up a list of designated Measurements for an group for a category |
java.util.List |
findEnabledMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.String cat)
Look up a list of enabled Measurements for a category |
java.util.Map |
findEnabledMeasurements(java.util.Collection aeids)
|
Measurement |
findMeasurement(AuthzSubject subject,
java.lang.Integer tid,
AppdefEntityID aeid)
Find the Measurement corresponding to the given MeasurementTemplate id and instance id. |
Measurement |
findMeasurement(AuthzSubject subject,
java.lang.Integer tid,
java.lang.Integer iid,
boolean allowStale)
Look up a Measurement, allowing for the query to return a stale copy of the Measurement (for efficiency reasons). |
Measurement |
findMeasurementById(java.lang.Integer mid)
|
java.lang.Integer[] |
findMeasurementIds(AuthzSubject subject,
java.lang.Integer tid,
java.lang.Integer[] ids)
Look up a list of Measurements for a template and instances |
java.util.List |
findMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.String cat,
PageControl pc)
Look up a list of Measurements for a category XXX: Why is this method called findMeasurements() but only returns enabled measurements if cat == null?? |
java.util.List |
findMeasurements(AuthzSubject subject,
java.lang.Integer tid,
AppdefEntityID[] aeids)
Look up a list of Measurements for a template and instances |
java.util.Map |
findMeasurements(AuthzSubject subject,
java.util.Map resIdsToTemplIds)
|
java.util.List |
findMeasurements(AuthzSubject subject,
Resource res)
XXX: not sure why all the findMeasurements require an authz if they do not check the viewPermissions?? |
java.util.List |
findMeasurementsByCategory(java.lang.String cat)
Look up a list of Measurement objects by category |
java.util.List |
findMetricCountSummaries()
Gets a summary of the metrics which are scheduled for collection, across all resource types and metrics. |
java.util.Map |
findMetricIntervals(AuthzSubject subject,
AppdefEntityID[] aeids,
java.lang.Integer[] tids)
Look up a list of Measurement intervals for template IDs. |
java.util.Map |
findNumMetricsPerAgent()
Get the # of metrics that each agent is collecting. |
Measurement |
getAvailabilityMeasurement(AuthzSubject subject,
AppdefEntityID id)
Deprecated. Use getAvailabilityMeasurement(Resource) instead. |
Measurement |
getAvailabilityMeasurement(Resource r)
Get an Availability Measurement by Resource. |
java.util.Map |
getAvailMeasurements(java.util.Collection resources)
TODO: scottmf, need to do some more work to handle other authz resource types other than platform, server, service, and group |
java.util.Map |
getEnabledMeasurements(java.util.List resources)
|
int |
getEnabledMetricsCount(AuthzSubject subject,
AppdefEntityID id)
Count of metrics enabled for a particular entity |
void |
getLiveMeasurementValues(AuthzSubject subject,
AppdefEntityID id)
Get the live measurement values for a given resource. |
Measurement |
getMeasurement(AuthzSubject s,
Resource r,
java.lang.String alias)
Look up a Measurement for a Resource and Measurement alias |
Measurement |
getMeasurement(java.lang.Integer mid)
Get a Measurement by Id. |
java.util.List |
getMeasurements(java.lang.Integer[] tids,
java.lang.Integer[] aeids)
|
static org.hyperic.hq.measurement.shared.MeasurementManagerLocal |
getOne()
|
void |
handleCreateRefreshEvents(java.util.List events)
Handle events from the MeasurementEnabler. |
void |
handleResourceDelete(Resource r)
Resource to be deleted, dissociate metrics from resource |
int |
removeOrphanedMeasurements()
Remove all measurements no longer associated with a resource. |
void |
setSessionContext(javax.ejb.SessionContext ctx)
|
void |
syncPluginMetrics(java.lang.String plugin)
|
void |
updateMeasurementInterval(AuthzSubject subject,
java.lang.Integer mId,
long interval)
|
| Methods inherited from class org.hyperic.hq.measurement.server.session.SessionEJB |
|---|
checkDeletePermission, checkModifyPermission, checkTimeArguments, deleteMetricProblems, getAgent, getAgent, getAgentMan, getAuthzSubjectManager, getAvailabilityDataDAO, getBaselineDAO, getCategoryDAO, getDataMan, getInitialContext, getMeasurementDAO, getMeasurementTemplateDAO, getMetricProblemDAO, getMonitorableTypeDAO, getMPM, getProductMan, getResource, getScheduleRevNumDAO, getSRNManager, getTemplateMan |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MeasurementManagerEJBImpl()
| Method Detail |
|---|
public java.util.List createMeasurements(AppdefEntityID id,
java.lang.Integer[] templates,
long[] intervals,
ConfigResponse props)
throws MeasurementCreateException,
TemplateNotFoundException
templates - List of Integer template IDs to addid - instance ID (appdef resource) the templates are forintervals - Millisecond interval that the measurement is polledprops - Configuration data for the instance
MeasurementCreateException
TemplateNotFoundException
public java.util.List createMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.Integer[] templates,
long[] intervals,
ConfigResponse props)
throws PermissionException,
MeasurementCreateException,
TemplateNotFoundException
List of Measurements
PermissionException
MeasurementCreateException
TemplateNotFoundException
public java.util.List createMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.Integer[] templates,
ConfigResponse props)
throws PermissionException,
MeasurementCreateException,
TemplateNotFoundException
templates - List of Integer template IDs to addid - instance ID (appdef resource) the templates are forprops - Configuration data for the instance
List of Measurements
PermissionException
MeasurementCreateException
TemplateNotFoundExceptionpublic Measurement findMeasurementById(java.lang.Integer mid)
public int removeOrphanedMeasurements()
public Measurement getMeasurement(AuthzSubject s,
Resource r,
java.lang.String alias)
throws MeasurementNotFoundException
MeasurementNotFoundExceptionpublic Measurement getMeasurement(java.lang.Integer mid)
public void getLiveMeasurementValues(AuthzSubject subject,
AppdefEntityID id)
throws PermissionException,
LiveMeasurementException,
MeasurementNotFoundException
id - The id of the resource
PermissionException
LiveMeasurementException
MeasurementNotFoundException
public int getEnabledMetricsCount(AuthzSubject subject,
AppdefEntityID id)
public java.util.Map findMeasurements(AuthzSubject subject,
java.util.Map resIdsToTemplIds)
throws PermissionException
subject - AuthzSubjectresIdsToTemplIds - Map of Integer of resourceIds to
List of templateIds
Map of Resource to List of
Measurements
PermissionException
public Measurement findMeasurement(AuthzSubject subject,
java.lang.Integer tid,
AppdefEntityID aeid)
throws MeasurementNotFoundException
tid - The MeasurementTemplate idaeid - The entity id.
MeasurementNotFoundException
public Measurement findMeasurement(AuthzSubject subject,
java.lang.Integer tid,
java.lang.Integer iid,
boolean allowStale)
throws MeasurementNotFoundException
subject - The subject.tid - The template Id.iid - The instance Id.allowStale - true to allow stale copies of an alert
definition in the query results; false to
never allow stale copies, potentially always forcing a
sync with the database.
MeasurementNotFoundException
public java.util.List findMeasurements(AuthzSubject subject,
java.lang.Integer tid,
AppdefEntityID[] aeids)
public java.lang.Integer[] findMeasurementIds(AuthzSubject subject,
java.lang.Integer tid,
java.lang.Integer[] ids)
public java.util.List findMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.String cat,
PageControl pc)
public java.util.Map getEnabledMeasurements(java.util.List resources)
aeids - List of Resources
Map of Integer representing resourceId to
List of Measurementspublic java.util.Map findEnabledMeasurements(java.util.Collection aeids)
aeids - List of AppdefEntityIDs
Map of Integer representing resourceId to
List of Measurements
public java.util.List findEnabledMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.String cat)
Measurementpublic java.util.List findDesignatedMeasurements(AppdefEntityID id)
public java.util.List findDesignatedMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.String cat)
public java.util.List findDesignatedMeasurements(AuthzSubject subject,
ResourceGroup g,
java.lang.String cat)
public Measurement getAvailabilityMeasurement(AuthzSubject subject,
AppdefEntityID id)
public Measurement getAvailabilityMeasurement(Resource r)
public java.util.List findMeasurementsByCategory(java.lang.String cat)
public java.util.Map findDesignatedMeasurements(AuthzSubject subject,
AppdefEntityID[] ids,
java.lang.String cat)
throws MeasurementNotFoundException
MeasurementNotFoundExceptionpublic java.util.Map getAvailMeasurements(java.util.Collection resources)
Map of Integer to List of
Measurements, Integer => Resource.getId(),
public java.util.Map findMetricIntervals(AuthzSubject subject,
AppdefEntityID[] aeids,
java.lang.Integer[] tids)
public java.util.List findAllEnabledMeasurementsAndTemplates()
public void enableMeasurements(AuthzSubject subject,
AppdefEntityID[] aeids,
java.lang.Integer[] mtids,
long interval)
throws MeasurementNotFoundException,
MeasurementCreateException,
TemplateNotFoundException,
PermissionException
MeasurementNotFoundException
MeasurementCreateException
TemplateNotFoundException
PermissionException
public void enableMeasurements(AuthzSubject subject,
java.lang.Integer[] mids)
throws PermissionException
PermissionException
public void enableMeasurement(AuthzSubject subject,
java.lang.Integer mId,
long interval)
throws PermissionException
PermissionException
public void enableDefaultMeasurements(AuthzSubject subj,
Resource r)
throws PermissionException
PermissionException
public void updateMeasurementInterval(AuthzSubject subject,
java.lang.Integer mId,
long interval)
throws PermissionException
PermissionException
public void disableMeasurements(AuthzSubject subject,
AppdefEntityID agentId,
AppdefEntityID[] ids)
throws PermissionException,
AgentNotFoundException
agentId - The entity id to use to look up the agent connectionids - The list of entitys to unschedule
PermissionException
AgentNotFoundException
public void disableMeasurements(AuthzSubject subject,
Agent agent,
AppdefEntityID[] ids,
boolean isAsyncDelete)
throws PermissionException
agent - The agent for the given resourcesids - The list of entitys to unscheduleisAsyncDelete - Indicates whether it is for async delete
PermissionException
public void disableMeasurements(AuthzSubject subject,
AppdefEntityID id)
throws PermissionException
PermissionException
public void disableMeasurements(AuthzSubject subject,
Resource res)
throws PermissionException
PermissionException
public void disableMeasurements(AuthzSubject subject,
Resource res,
boolean isAsyncDelete)
throws PermissionException
PermissionException
public java.util.List findMeasurements(AuthzSubject subject,
Resource res)
public void disableMeasurements(AuthzSubject subject,
AppdefEntityID id,
java.lang.Integer[] tids)
throws PermissionException
PermissionExceptionpublic void syncPluginMetrics(java.lang.String plugin)
public java.util.List findMetricCountSummaries()
CollectionSummary beanspublic java.util.List findAgentOffsetTuples()
Agent
the Platform it manages
the Server representing the Agent
the Measurement that contains the Server Offset value
public java.util.Map findNumMetricsPerAgent()
Agent onto Longs indicating how many metrics
that agent is collecting.public void handleCreateRefreshEvents(java.util.List events)
MeasurementEnabler. This method
is required to place the operation within a transaction (and session)
public void checkConfiguration(AuthzSubject subject,
AppdefEntityID entity,
ConfigResponse config)
throws PermissionException,
InvalidConfigException,
AppdefEntityNotFoundException
entity - Entity to check the configuration forconfig - Configuration to check
PermissionException
InvalidConfigException
AppdefEntityNotFoundException
public java.util.List getMeasurements(java.lang.Integer[] tids,
java.lang.Integer[] aeids)
Measurement of MeasurementIdspublic void handleResourceDelete(Resource r)
public void buildMeasurementEvent(MeasurementEvent event)
public static org.hyperic.hq.measurement.shared.MeasurementManagerLocal getOne()
public void ejbCreate()
throws javax.ejb.CreateException
javax.ejb.CreateExceptionpublic void ejbPostCreate()
public void ejbActivate()
ejbActivate in interface javax.ejb.SessionBeanpublic void ejbPassivate()
ejbPassivate in interface javax.ejb.SessionBeanpublic void ejbRemove()
ejbRemove in interface javax.ejb.SessionBeanpublic void setSessionContext(javax.ejb.SessionContext ctx)
setSessionContext in interface javax.ejb.SessionBean
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||