|
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.autoinventory.server.session.AutoinventoryManagerEJBImpl
public class AutoinventoryManagerEJBImpl
This class is responsible for managing Autoinventory objects in autoinventory and their relationships
Field Summary | |
---|---|
protected java.lang.String |
DATASOURCE_NAME
|
Constructor Summary | |
---|---|
AutoinventoryManagerEJBImpl()
|
Method Summary | |
---|---|
void |
_reportAIRuntimeReport(java.lang.String agentToken,
CompositeRuntimeResourceReport crrr)
Should only be called from RuntimePlatformAndServerMerger |
AIHistory |
createAIHistory(AppdefEntityID id,
java.lang.Integer groupId,
java.lang.Integer batchId,
java.lang.String subjectName,
ScanConfigurationCore config,
java.lang.String scanName,
java.lang.String scanDesc,
java.lang.Boolean scheduled,
long startTime,
long stopTime,
long scheduleTime,
java.lang.String status,
java.lang.String errorMessage)
create AIHistory |
void |
ejbActivate()
|
void |
ejbCreate()
Create an autoinventory manager session bean. |
void |
ejbPassivate()
|
void |
ejbRemove()
|
java.util.List |
findAgentsRequiringRuntimeScan()
Returns a list of Agent s which still need to send in a
runtime scan (their last runtime scan was unsuccessfully processed) |
protected org.hyperic.hq.appdef.shared.AIQueueManagerLocal |
getAIQueueManagerLocal()
If we ever have more than this single session EJB, this method ought to be placed in a superclass, kinda like appdef has the AppdefSessionEJB as a base class for all other appdef session EJBs. |
protected AIHistoryDAO |
getHistoryDAO()
|
static org.hyperic.hq.autoinventory.shared.AutoinventoryManagerLocal |
getOne()
|
ScanStateCore |
getScanStatus(AuthzSubject subject,
AppdefEntityID aid)
Get status for an autoinventory scan. |
ScanStateCore |
getScanStatusByAgentToken(AuthzSubject subject,
java.lang.String agentToken)
Get status for an autoinventory scan, given the agentToken |
java.util.Map |
getServerSignatures(AuthzSubject subject,
java.util.List serverTypes)
Get server signatures for a set of servertypes. |
void |
handleResourceEvents(java.util.List events)
Handle ResourceZEvents for enabling runtime autodiscovery. |
boolean |
isRuntimeDiscoverySupported(AuthzSubject subject,
AppdefEntityID id)
Check if a given Appdef entity supports runtime auto-discovery. |
void |
markServiceClean(Agent agent,
boolean serviceClean)
|
void |
markServiceClean(java.lang.String agentToken)
|
java.util.List |
mergePlatformsAndServers(java.lang.String agentToken,
CompositeRuntimeResourceReport crrr)
Merge platforms and servers from the runtime report. |
void |
mergeServices(java.util.List mergeInfos)
Merge a list of RuntimeReportProcessor.ServiceMergeInfo s in HQ's appdef model |
void |
notifyAgentsNeedingRuntimeScan()
|
void |
removeHistory(AIHistory history)
remove AIHistory |
void |
reportAIData(java.lang.String agentToken,
ScanStateCore stateCore)
Called by agents to report platforms, servers, and services detected via autoinventory scans. |
void |
reportAIRuntimeReport(java.lang.String agentToken,
CompositeRuntimeResourceReport crrr)
Called by agents to report resources detected at runtime via monitoring-based autoinventory scans. |
void |
setSessionContext(javax.ejb.SessionContext ctx)
|
void |
startScan(AuthzSubject subject,
AppdefEntityID aid,
ScanConfigurationCore scanConfig,
java.lang.String scanName,
java.lang.String scanDesc,
ScheduleValue schedule)
Start an autoinventory scan. |
void |
startScan(AuthzSubject subject,
java.lang.String agentToken,
ScanConfigurationCore scanConfig)
Start an autoinventory scan by agentToken |
void |
startup()
|
void |
stopScan(AuthzSubject subject,
AppdefEntityID aid)
Stop an autoinventory scan. |
void |
toggleRuntimeScan(AuthzSubject subject,
AppdefEntityID id,
boolean enable)
Toggle Runtime-AI config for the given server. |
void |
turnOffRuntimeDiscovery(AuthzSubject subject,
AppdefEntityID id)
Turn off runtime-autodiscovery for a server that no longer exists. |
void |
turnOffRuntimeDiscovery(AuthzSubject subject,
AppdefEntityID id,
java.lang.String agentToken)
Turn off runtime-autodiscovery for a server that no longer exists. |
void |
updateAIHistory(java.lang.Integer jobId,
long endTime,
java.lang.String status,
java.lang.String message)
update AIHistory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.lang.String DATASOURCE_NAME
Constructor Detail |
---|
public AutoinventoryManagerEJBImpl()
Method Detail |
---|
public java.util.Map getServerSignatures(AuthzSubject subject, java.util.List serverTypes) throws javax.ejb.FinderException, AutoinventoryException
serverTypes
- A List of ServerTypeValue objects representing the
server types to get signatures for. If this is null, all server
signatures are returned.
javax.ejb.FinderException
AutoinventoryException
public boolean isRuntimeDiscoverySupported(AuthzSubject subject, AppdefEntityID id)
id
- The entity id to check.
public void turnOffRuntimeDiscovery(AuthzSubject subject, AppdefEntityID id) throws PermissionException
id
- The AppdefEntityID of the resource to turn
off runtime config for.
PermissionException
public void turnOffRuntimeDiscovery(AuthzSubject subject, AppdefEntityID id, java.lang.String agentToken) throws PermissionException
id
- The AppdefEntityID of the resource to turn
off runtime config for.agentToken
- Which agent controls the runtime AI scans for
this resource.
PermissionException
public void toggleRuntimeScan(AuthzSubject subject, AppdefEntityID id, boolean enable) throws PermissionException, AutoinventoryException, ResourceDeletedException
PermissionException
AutoinventoryException
ResourceDeletedException
public void startScan(AuthzSubject subject, AppdefEntityID aid, ScanConfigurationCore scanConfig, java.lang.String scanName, java.lang.String scanDesc, ScheduleValue schedule) throws AgentConnectionException, AgentNotFoundException, AutoinventoryException, DuplicateAIScanNameException, ScheduleWillNeverFireException, PermissionException
aid
- The appdef entity whose agent we'll talk to.scanConfig
- The scan configuration to use when scanning.scanName
- The name of the scan - this is ignored (i.e. it can be
null) for immediate, one-time scans.scanDesc
- The description of the scan - this is ignored (i.e. it
can be null) for immediate, one-time scans.schedule
- Described when and how often the scan should run. If
this is null, then the scan will be run as an immediate, one-time only
scan.
AgentConnectionException
AgentNotFoundException
AutoinventoryException
DuplicateAIScanNameException
ScheduleWillNeverFireException
PermissionException
public void startScan(AuthzSubject subject, java.lang.String agentToken, ScanConfigurationCore scanConfig) throws AgentConnectionException, AgentNotFoundException, AutoinventoryException, PermissionException
AgentConnectionException
AgentNotFoundException
AutoinventoryException
PermissionException
public void stopScan(AuthzSubject subject, AppdefEntityID aid) throws AutoinventoryException
aid
- The appdef entity whose agent we'll talk to.
AutoinventoryException
public ScanStateCore getScanStatus(AuthzSubject subject, AppdefEntityID aid) throws AgentNotFoundException, AgentConnectionException, AgentRemoteException, AutoinventoryException
aid
- The appdef entity whose agent we'll talk to.
AgentNotFoundException
AgentConnectionException
AgentRemoteException
AutoinventoryException
public AIHistory createAIHistory(AppdefEntityID id, java.lang.Integer groupId, java.lang.Integer batchId, java.lang.String subjectName, ScanConfigurationCore config, java.lang.String scanName, java.lang.String scanDesc, java.lang.Boolean scheduled, long startTime, long stopTime, long scheduleTime, java.lang.String status, java.lang.String errorMessage) throws AutoinventoryException
AutoinventoryException
public void removeHistory(AIHistory history)
public void updateAIHistory(java.lang.Integer jobId, long endTime, java.lang.String status, java.lang.String message)
protected AIHistoryDAO getHistoryDAO()
public ScanStateCore getScanStatusByAgentToken(AuthzSubject subject, java.lang.String agentToken) throws AgentNotFoundException, AgentConnectionException, AgentRemoteException, AutoinventoryException
AgentNotFoundException
AgentConnectionException
AgentRemoteException
AutoinventoryException
public void reportAIData(java.lang.String agentToken, ScanStateCore stateCore) throws AutoinventoryException
agentToken
- The token identifying the agent that sent
the report.stateCore
- The ScanState that was detected during the autoinventory
scan.
AutoinventoryException
public void reportAIRuntimeReport(java.lang.String agentToken, CompositeRuntimeResourceReport crrr) throws AutoinventoryException, PermissionException, ValidationException, ApplicationException
agentToken
- The token identifying the agent that sent
the report.crrr
- The CompositeRuntimeResourceReport that was generated
during the runtime autoinventory scan.
AutoinventoryException
PermissionException
ValidationException
ApplicationException
public void _reportAIRuntimeReport(java.lang.String agentToken, CompositeRuntimeResourceReport crrr) throws AutoinventoryException, PermissionException, ValidationException, ApplicationException
AutoinventoryException
PermissionException
ValidationException
ApplicationException
public java.util.List mergePlatformsAndServers(java.lang.String agentToken, CompositeRuntimeResourceReport crrr) throws ApplicationException, AutoinventoryException
RuntimeReportProcessor.ServiceMergeInfo
-- information from the
report about services still needing to be processed
ApplicationException
AutoinventoryException
public void mergeServices(java.util.List mergeInfos) throws PermissionException, ApplicationException
RuntimeReportProcessor.ServiceMergeInfo
s in HQ's appdef model
PermissionException
ApplicationException
public java.util.List findAgentsRequiringRuntimeScan()
Agent
s which still need to send in a
runtime scan (their last runtime scan was unsuccessfully processed)
public void notifyAgentsNeedingRuntimeScan()
public void markServiceClean(java.lang.String agentToken)
public void markServiceClean(Agent agent, boolean serviceClean)
public void startup()
public void handleResourceEvents(java.util.List events)
events
- A list of ResourceZeventspublic void setSessionContext(javax.ejb.SessionContext ctx)
setSessionContext
in interface javax.ejb.SessionBean
public static org.hyperic.hq.autoinventory.shared.AutoinventoryManagerLocal getOne()
public void ejbCreate() throws javax.ejb.CreateException
javax.ejb.CreateException
- If an error occurs creating the pager
for the bean.public void ejbRemove()
ejbRemove
in interface javax.ejb.SessionBean
public void ejbActivate()
ejbActivate
in interface javax.ejb.SessionBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.SessionBean
protected org.hyperic.hq.appdef.shared.AIQueueManagerLocal getAIQueueManagerLocal()
|
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 |