Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

## org.hyperic.hq.appdef.server.session
Class AgentManagerEJBImpl

    java.lang.Object
      org.hyperic.hq.appdef.server.session.AppdefSessionUtil
          org.hyperic.hq.appdef.server.session.AppdefSessionEJB
              org.hyperic.hq.appdef.server.session.AgentManagerEJBImpl

All Implemented Interfaces:
  java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

    public class AgentManagerEJBImpl

extends AppdefSessionEJB
implements javax.ejb.SessionBean

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.hyperic.hq.appdef.server.session.AppdefSessionEJB
`_ctx, _ic`

Constructor Summary
`AgentManagerEJBImpl()`

Method Summary
`void` | `checkAgentAuth(java.lang.String agentToken)` Find an agent by the token which is Required for the agent to send when it connects.
`Agent` | `createLegacyAgent(java.lang.String address, java.lang.Integer port, java.lang.String authToken, java.lang.String agentToken, java.lang.String version)` Create a new Agent object.
`Agent` | `createNewTransportAgent(java.lang.String address, java.lang.Integer port, java.lang.String authToken, java.lang.String agentToken, java.lang.String version, boolean unidirectional)` Create a new Agent object.
`void` | `disconnectAgent(AgentConnections.AgentConnection a)`
`void` | `ejbActivate()`
`void` | `ejbCreate()`
`void` | `ejbPassivate()`
`void` | `ejbRemove()`
`Agent` | `findAgent(java.lang.Integer id)`
`java.util.List` | `findAgents(PageInfo pInfo)` Get a paged list of agents in the system.
`java.util.List` | `findAgentsByIP(java.lang.String ip)`
`Agent` | `getAgent(AppdefEntityID aID)` Find an agent which can service the given entity ID
`Agent` | `getAgent(java.lang.Integer id)` Get an Agent by id.
`Agent` | `getAgent(java.lang.String agentToken)` Find an agent by agent token.
`Agent` | `getAgent(java.lang.String ip, int port)` Find an agent listening on a specific IP & port
`AgentConnections.AgentConnection` | `getAgentConnection(java.lang.String method, java.lang.String connIp, java.lang.Integer agentId)`
`int` | `getAgentCount()` Get a count of all the agents in the system
`int` | `getAgentCountUsed()` Get a count of the agents which are actually used (i.e.
`java.util.Map` | `getAgentMap(java.util.Collection aeids)`
`protected AgentReportStatusDAO` | `getAgentReportStatusDAO()`
`java.util.List` | `getAgents()` Get a list of all the agents in the system
`protected AgentTypeDAO` | `getAgentTypeDAO()`
`java.util.Collection` | `getConnectedAgents()`
`java.lang.String` | `getCurrentAgentBundle(AuthzSubject subject, AppdefEntityID aid)` Return the bundle that is currently running on a give agent.
`ResourceTree` | `getEntitiesForAgent(AuthzSubject subject, java.lang.String agentToken)` Get a list of all the entities which can be serviced by an Agent.
`int` | `getNumConnectedAgents()`
`static org.hyperic.hq.appdef.shared.AgentManagerLocal` | `getOne()`
`long` | `getTotalConnectedAgents()`
`boolean` | `isAgentTokenUnique(java.lang.String agentToken)` Determine if the agent token is already assigned to another agent.
`long` | `pingAgent(AuthzSubject subject, Agent agent)` Pings the specified agent.
`long` | `pingAgent(AuthzSubject subject, AppdefEntityID id)` Pings the specified agent.
`void` | `removeAgent(Agent agent)`
`void` | `removeAgentStatus(Agent agent)`
`void` | `restartAgent(AuthzSubject subject, AppdefEntityID aid)` Restarts the specified agent using the Java Service Wrapper.
`void` | `setSessionContext(javax.ejb.SessionContext ctx)`
`void` | `transferAgentBundle(AuthzSubject subject, AppdefEntityID aid, java.lang.String bundleFileName)` Transfer an agent bundle residing on the HQ server to an agent.
`void` | `transferAgentBundleAsync(AuthzSubject subject, AppdefEntityID aid, java.lang.String bundleFileName)` Transfer asynchronously an agent bundle residing on the HQ server to an agent.
`void` | `transferAgentPlugin(AuthzSubject subject, AppdefEntityID aid, java.lang.String plugin)` Transfer an agent plugin residing on the HQ server to an agent.
`void` | `transferAgentPluginAsync(AuthzSubject subject, AppdefEntityID aid, java.lang.String plugin)` Transfer an agent plugin residing on the HQ server to an agent.
`Agent` | `updateLegacyAgent(java.lang.String ip, int port, java.lang.String authToken, java.lang.String agentToken, java.lang.String version)` Update an existing Agent given an IP and port.
`Agent` | `updateLegacyAgent(java.lang.String agentToken, java.lang.String ip, int port)` Update an existing agent's IP and port based on an agent token.
`Agent` | `updateLegacyAgent(java.lang.String agentToken, java.lang.String ip, int port, java.lang.String authToken, java.lang.String version)` Update an existing Agent given the old agent token.
`Agent` | `updateNewTransportAgent(java.lang.String ip, int port, java.lang.String authToken, java.lang.String agentToken, java.lang.String version, boolean unidirectional)` Update an existing Agent given an IP and port.
`Agent` | `updateNewTransportAgent(java.lang.String agentToken, java.lang.String ip, int port, boolean unidirectional)` Update an existing agent's IP and port based on an agent token.
`Agent` | `updateNewTransportAgent(java.lang.String agentToken, java.lang.String ip, int port, java.lang.String authToken, java.lang.String version, boolean unidirectional)` Update an existing Agent given the old agent token.
`void` | `upgradeAgent(AuthzSubject subject, AppdefEntityID aid, java.lang.String bundleFileName)` Upgrade an agent synchronously including agent restart.
`void` | `upgradeAgentAsync(AuthzSubject subject, AppdefEntityID aid, java.lang.String bundleFileName)` Upgrade an agent asynchronously including agent restart.
`void` | `upgradeAgentBundle(AuthzSubject subject, AppdefEntityID aid, java.lang.String bundleFileName)` Upgrade to the specified agent bundle residing on the HQ agent.

Methods inherited from class org.hyperic.hq.appdef.server.session.AppdefSessionEJB
`changeOwner, checkAIScanPermission, checkAlertingPermission, checkAlertingScope, checkControlPermission, checkCreateChildPermission, checkCreatePlatformPermission, checkModifyPermission, checkMonitorPermission, checkPermission, checkPermission, checkRemovePermission, checkViewPermission, createAuthzResource, createAuthzResource, deleteCustomProperties, filterResourceTypes, filterViewableServers, getApplicationPrototypeResourceType, getApplicationResourceType, getAuthzResourceType, getGroupResourceType, getInitialContext, getOperationByName, getOverlord, getPlatformPrototypeResourceType, getPlatformResourceType, getResourcePermissions, getResourceType, getRootResourceType, getServerPrototypeResourceType, getServerResourceType, getServiceCluster, getServicePrototypeResourceType, getServiceResourceType, getSessionContext, getViewableApplications, getViewableGroups, getViewablePlatformPKs, getViewablePlatforms, getViewableServers, getViewableServiceInventory, getViewableServices, removeAuthzResource, rollback`

Methods inherited from class org.hyperic.hq.appdef.server.session.AppdefSessionUtil
`findResourceType, findResourceType, getAgentDAO, getAIQManagerLocal, getApplicationDAO, getApplicationManager, getConfigManager, getConfigResponseDAO, getCPropManager, getPlatformDAO, getPlatformManager, getPlatformTypeDAO, getResourceManager, getServerDAO, getServerManager, getServerTypeDAO, getServiceDAO, getServiceManager, getServiceTypeDAO`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AgentManagerEJBImpl

    public AgentManagerEJBImpl()

Method Detail

### removeAgentStatus

    public void removeAgentStatus(Agent agent)

### removeAgent

    public void removeAgent(Agent agent)

### getEntitiesForAgent

    public ResourceTree getEntitiesForAgent(AuthzSubject subject,
                                            java.lang.String agentToken)
                                     throws AgentNotFoundException,
                                            PermissionException

  Get a list of all the entities which can be serviced by an Agent.

  Throws:
    `AgentNotFoundException`
    `PermissionException`

### findAgents

    public java.util.List findAgents(PageInfo pInfo)

  Get a paged list of agents in the system.

  Parameters:
    `pInfo` - a pager object, with an `AgentSortField` sort field
  Returns:
    a list of `Agent`s

### getAgents

    public java.util.List getAgents()

  Get a list of all the agents in the system

### getAgentCount

    public int getAgentCount()

  Get a count of all the agents in the system

### getAgentCountUsed

    public int getAgentCountUsed()

  Get a count of the agents which are actually used (i.e. have platforms)

### getAgentMap

    public java.util.Map getAgentMap(java.util.Collection aeids)

  Parameters:
    `aeids` - `Collection` of `AppdefEntityID`s
  Returns:
    Map of `Agent` to `Collection` of ${AppdefEntityID}s

### createNewTransportAgent

    public Agent createNewTransportAgent(java.lang.String address,
                                         java.lang.Integer port,
                                         java.lang.String authToken,
                                         java.lang.String agentToken,
                                         java.lang.String version,
                                         boolean unidirectional)
                                  throws AgentCreateException

  Create a new Agent object. The type of the agent that is created is the 'hyperic-hq-remoting' agent. This type of agent may be configured to use either a bidirectional or unidirectional transport.

  Throws:
    `AgentCreateException`

### createLegacyAgent

    public Agent createLegacyAgent(java.lang.String address,
                                   java.lang.Integer port,
                                   java.lang.String authToken,
                                   java.lang.String agentToken,
                                   java.lang.String version)
                            throws AgentCreateException

  Create a new Agent object. The type of the agent that is created is the legacy 'covalent-eam' type.

  Throws:
    `AgentCreateException`

### updateNewTransportAgent

    public Agent updateNewTransportAgent(java.lang.String agentToken,
                                         java.lang.String ip,
                                         int port,
                                         java.lang.String authToken,
                                         java.lang.String version,
                                         boolean unidirectional)
                                  throws AgentNotFoundException

  Update an existing Agent given the old agent token. The auth token will be reset. The type of the agent that is updated is the 'hyperic-hq-remoting' agent. This type of agent may be configured to use either a bidirectional or unidirectional transport.

  Returns:
    An Agent object representing the updated agent
  Throws:
    `AgentNotFoundException`

### updateLegacyAgent

    public Agent updateLegacyAgent(java.lang.String agentToken,
                                   java.lang.String ip,
                                   int port,
                                   java.lang.String authToken,
                                   java.lang.String version)
                            throws AgentNotFoundException

  Update an existing Agent given the old agent token. The auth token will be reset. The type of the agent that is updated is the legacy 'covalent-eam' type.

  Returns:
    An Agent object representing the updated agent
  Throws:
    `AgentNotFoundException`

### updateNewTransportAgent

    public Agent updateNewTransportAgent(java.lang.String ip,
                                         int port,
                                         java.lang.String authToken,
                                         java.lang.String agentToken,
                                         java.lang.String version,
                                         boolean unidirectional)
                                  throws AgentNotFoundException

  Update an existing Agent given an IP and port. The type of the agent that is updated is the 'hyperic-hq-remoting' agent. This type of agent may be configured to use either a bidirectional or unidirectional transport.

  Returns:
    An Agent object representing the updated agent
  Throws:
    `AgentNotFoundException`

### updateLegacyAgent

    public Agent updateLegacyAgent(java.lang.String ip,
                                   int port,
                                   java.lang.String authToken,
                                   java.lang.String agentToken,
                                   java.lang.String version)
                            throws AgentNotFoundException

  Update an existing Agent given an IP and port. The type of the agent that is updated is the legacy 'covalent-eam' type.

  Returns:
    An Agent object representing the updated agent
  Throws:
    `AgentNotFoundException`

### findAgentsByIP

    public java.util.List findAgentsByIP(java.lang.String ip)

### updateNewTransportAgent

    public Agent updateNewTransportAgent(java.lang.String agentToken,
                                         java.lang.String ip,
                                         int port,
                                         boolean unidirectional)
                                  throws AgentNotFoundException

  Update an existing agent's IP and port based on an agent token. The type of the agent that is updated is the 'hyperic-hq-remoting' agent. This type of agent may be configured to use either a bidirectional or unidirectional transport.

  Parameters:
    `agentToken` - Token that the agent uses to connect to HQ
    `ip` - The new IP address
    `port` - The new port
  Returns:
    An Agent object representing the updated agent
  Throws:
    `AgentNotFoundException`

### updateLegacyAgent

    public Agent updateLegacyAgent(java.lang.String agentToken,
                                   java.lang.String ip,
                                   int port)
                            throws AgentNotFoundException

  Update an existing agent's IP and port based on an agent token. The type of the agent that is updated is the legacy 'covalent-eam' type.

  Parameters:
    `agentToken` - Token that the agent uses to connect to HQ
    `ip` - The new IP address
    `port` - The new port
  Returns:
    An Agent object representing the updated agent
  Throws:
    `AgentNotFoundException`

### checkAgentAuth

    public void checkAgentAuth(java.lang.String agentToken)
                        throws AgentUnauthorizedException

  Find an agent by the token which is Required for the agent to send when it connects.

  Throws:
    `AgentUnauthorizedException`

### getAgentConnection

    public AgentConnections.AgentConnection getAgentConnection(java.lang.String method,
                                                               java.lang.String connIp,
                                                               java.lang.Integer agentId)

### disconnectAgent

    public void disconnectAgent(AgentConnections.AgentConnection a)

### getConnectedAgents

    public java.util.Collection getConnectedAgents()

### getNumConnectedAgents

    public int getNumConnectedAgents()

### getTotalConnectedAgents

    public long getTotalConnectedAgents()

### getAgent

    public Agent getAgent(java.lang.String ip,
                          int port)
                   throws AgentNotFoundException

  Find an agent listening on a specific IP & port

  Throws:
    `AgentNotFoundException`

### getAgent

    public Agent getAgent(java.lang.String agentToken)
                   throws AgentNotFoundException

  Find an agent by agent token.

  Parameters:
    `agentToken` - the agent token to look for
  Returns:
    An Agent representing the agent that has the given token.
  Throws:
    `AgentNotFoundException`

### isAgentTokenUnique

    public boolean isAgentTokenUnique(java.lang.String agentToken)

  Determine if the agent token is already assigned to another agent.

  Parameters:
    `agentToken` - The agent token.
  Returns:
    `true` if the agent token is unique; `false` if it is already assigned to an agent.

### findAgent

    public Agent findAgent(java.lang.Integer id)

### getAgent

    public Agent getAgent(java.lang.Integer id)

  Get an Agent by id.

### getAgent

    public Agent getAgent(AppdefEntityID aID)
                   throws AgentNotFoundException

  Find an agent which can service the given entity ID

  Returns:
    An agent which is set to manage the specified ID
  Throws:
    `AgentNotFoundException`

### getCurrentAgentBundle

    public java.lang.String getCurrentAgentBundle(AuthzSubject subject,
                                                  AppdefEntityID aid)
                                           throws PermissionException,
                                                  AgentNotFoundException,
                                                  AgentRemoteException,
                                                  AgentConnectionException

  Return the bundle that is currently running on a give agent. The returned bundle name may be parsed to retrieve the current agent version.

  Parameters:
    `subject` - The subject issuing the request.
    `aid` - The agent id.
  Returns:
    The bundle name currently running.
  Throws:
    `PermissionException` - if the subject does not have proper permissions to issue the query.
    `AgentNotFoundException` - if no agent exists with the given agent id.
    `AgentRemoteException` - if an exception occurs on the remote agent side.
    `AgentConnectionException` - if the connection to the agent fails.

### upgradeAgentAsync

    public void upgradeAgentAsync(AuthzSubject subject,
                                  AppdefEntityID aid,
                                  java.lang.String bundleFileName)
                           throws PermissionException,
                                  java.io.FileNotFoundException,
                                  AgentNotFoundException,
                                  ConfigPropertyException,
                                  java.lang.InterruptedException

  Upgrade an agent asynchronously including agent restart. This operation blocks long enough only to do some basic failure condition checking (permissions, agent existence, file existence, config property existence) then delegates the actual commands to the Zevent subsystem.

  Parameters:
    `subject` - The subject issuing the request.
    `aid` - The agent id.
    `bundleFileName` - The agent bundle name.
  Throws:
    `PermissionException` - if the subject does not have proper permissions to issue an agent upgrade.
    `java.io.FileNotFoundException` - if the agent bundle is not found on the HQ server.
    `AgentNotFoundException` - if no agent exists with the given agent id.
    `ConfigPropertyException` - if the server configuration cannot be retrieved.
    `java.lang.InterruptedException` - if enqueuing the Zevent is interrupted.

### upgradeAgent

    public void upgradeAgent(AuthzSubject subject,
                             AppdefEntityID aid,
                             java.lang.String bundleFileName)
                      throws PermissionException,
                             AgentNotFoundException,
                             AgentConnectionException,
                             AgentRemoteException,
                             java.io.FileNotFoundException,
                             ConfigPropertyException,
                             java.io.IOException

  Upgrade an agent synchronously including agent restart. This operation is composed of transferring the agent bundle, upgrading the agent, and restarting the agent, in that order.

  Parameters:
    `subject` - The subject issuing the request.
    `aid` - The agent id.
    `bundleFileName` - The agent bundle name.
  Throws:
    `PermissionException` - if the subject does not have proper permissions to issue an agent upgrade command.
    `java.io.FileNotFoundException` - if the agent bundle is not found on the HQ server.
    `java.io.IOException` - if an I/O error occurs, such as failing to calculate the file MD5 checksum.
    `AgentRemoteException` - if an exception occurs on the remote agent side.
    `AgentConnectionException` - if the connection to the agent fails.
    `AgentNotFoundException` - if no agent exists with the given agent id.
    `ConfigPropertyException` - if the server configuration cannot be retrieved.

### transferAgentBundleAsync

    public void transferAgentBundleAsync(AuthzSubject subject,
                                         AppdefEntityID aid,
                                         java.lang.String bundleFileName)
                                  throws PermissionException,
                                         AgentNotFoundException,
                                         java.io.FileNotFoundException,
                                         ConfigPropertyException,
                                         java.lang.InterruptedException

  Transfer asynchronously an agent bundle residing on the HQ server to an agent. This operation blocks long enough only to do some basic failure condition checking (permissions, agent existence, file existence, config property existence) then delegates the actual file transfer to the Zevent subsystem.

  Parameters:
    `subject` - The subject issuing the request.
    `aid` - The agent id.
    `bundleFileName` - The agent bundle name.
  Throws:
    `PermissionException` - if the subject does not have proper permissions to issue an agent bundle transfer.
    `java.io.FileNotFoundException` - if the agent bundle is not found on the HQ server.
    `AgentNotFoundException` - if no agent exists with the given agent id.
    `ConfigPropertyException` - if the server configuration cannot be retrieved.
    `java.lang.InterruptedException` - if enqueuing the Zevent is interrupted.

### transferAgentBundle

    public void transferAgentBundle(AuthzSubject subject,
                                    AppdefEntityID aid,
                                    java.lang.String bundleFileName)
                             throws PermissionException,
                                    AgentNotFoundException,
                                    AgentConnectionException,
                                    AgentRemoteException,
                                    java.io.FileNotFoundException,
                                    java.io.IOException,
                                    ConfigPropertyException

  Transfer an agent bundle residing on the HQ server to an agent.

  Parameters:
    `subject` - The subject issuing the request.
    `aid` - The agent id.
    `bundleFileName` - The agent bundle name.
  Throws:
    `PermissionException` - if the subject does not have proper permissions to issue an agent bundle transfer.
    `java.io.FileNotFoundException` - if the agent bundle is not found on the HQ server.
    `java.io.IOException` - if an I/O error occurs, such as failing to calculate the file MD5 checksum.
    `AgentRemoteException` - if an exception occurs on the remote agent side.
    `AgentConnectionException` - if the connection to the agent fails.
    `AgentNotFoundException` - if no agent exists with the given agent id.
    `ConfigPropertyException` - if the server configuration cannot be retrieved.

### transferAgentPlugin

    public void transferAgentPlugin(AuthzSubject subject,
                                    AppdefEntityID aid,
                                    java.lang.String plugin)
                             throws PermissionException,
                                    AgentConnectionException,
                                    AgentNotFoundException,
                                    AgentRemoteException,
                                    java.io.FileNotFoundException,
                                    java.io.IOException,
                                    ConfigPropertyException

  Transfer an agent plugin residing on the HQ server to an agent.

  Parameters:
    `subject` - The subject issuing the request.
    `aid` - The agent id.
    `plugin` - The plugin name.
  Throws:
    `PermissionException` - if the subject does not have proper permissions to issue an agent plugin transfer.
    `java.io.FileNotFoundException` - if the plugin is not found on the HQ server.
    `java.io.IOException` - if an I/O error occurs, such as failing to calculate the file MD5 checksum.
    `AgentRemoteException` - if an exception occurs on the remote agent side.
    `AgentConnectionException` - if the connection to the agent fails.
    `AgentNotFoundException` - if no agent exists with the given agent id.
    `ConfigPropertyException`

### transferAgentPluginAsync

    public void transferAgentPluginAsync(AuthzSubject subject,
                                         AppdefEntityID aid,
                                         java.lang.String plugin)
                                  throws PermissionException,
                                         java.io.FileNotFoundException,
                                         AgentNotFoundException,
                                         java.lang.InterruptedException

  Transfer an agent plugin residing on the HQ server to an agent. The transfer is performed asynchronously by placing on the Zevent queue and results in an agent restart.

  Parameters:
    `subject` - The subject issuing the request.
    `aid` - The agent id.
    `plugin` - The plugin name.
  Throws:
    `PermissionException` - if the subject does not have proper permissions to issue an agent plugin transfer.
    `java.io.FileNotFoundException` - if the plugin is not found on the HQ server.
    `AgentNotFoundException` - if no agent exists with the given agent id.
    `java.lang.InterruptedException` - if enqueuing the Zevent is interrupted.

### upgradeAgentBundle

    public void upgradeAgentBundle(AuthzSubject subject,
                                   AppdefEntityID aid,
                                   java.lang.String bundleFileName)
                            throws PermissionException,
                                   AgentNotFoundException,
                                   AgentConnectionException,
                                   AgentRemoteException,
                                   java.io.FileNotFoundException,
                                   java.io.IOException,
                                   ConfigPropertyException

  Upgrade to the specified agent bundle residing on the HQ agent.

  Parameters:
    `subject` - The subject issuing the request.
    `aid` - The agent id.
    `bundleFileName` - The agent bundle name.
  Throws:
    `PermissionException` - if the subject does not have proper permissions to issue an agent bundle transfer.
    `java.io.FileNotFoundException` - if the agent bundle is not found on the HQ server.
    `java.io.IOException` - if an I/O error occurs, such as failing to calculate the file MD5 checksum.
    `AgentRemoteException` - if an exception occurs on the remote agent side.
    `AgentConnectionException` - if the connection to the agent fails.
    `AgentNotFoundException` - if no agent exists with the given agent id.
    `ConfigPropertyException` - if the server configuration cannot be retrieved.

### restartAgent

    public void restartAgent(AuthzSubject subject,
                             AppdefEntityID aid)
                      throws PermissionException,
                             AgentNotFoundException,
                             AgentConnectionException,
                             AgentRemoteException,
                             java.io.FileNotFoundException,
                             java.io.IOException,
                             ConfigPropertyException

  Restarts the specified agent using the Java Service Wrapper.

  Parameters:
    `subject` - The subject issuing the request.
    `aid` - The agent id.
  Throws:
    `PermissionException` - if the subject does not have proper permissions to issue an agent bundle transfer.
    `java.io.FileNotFoundException` - if the agent bundle is not found on the HQ server.
    `java.io.IOException` - if an I/O error occurs, such as failing to calculate the file MD5 checksum.
    `AgentRemoteException` - if an exception occurs on the remote agent side.
    `AgentConnectionException` - if the connection to the agent fails.
    `AgentNotFoundException` - if no agent exists with the given agent id.
    `ConfigPropertyException` - if the server configuration cannot be retrieved.

### pingAgent

    public long pingAgent(AuthzSubject subject,
                          AppdefEntityID id)
                   throws AgentNotFoundException,
                          PermissionException,
                          AgentConnectionException,
                          java.io.IOException,
                          ConfigPropertyException,
                          AgentRemoteException

  Pings the specified agent.

  Throws:
    `AgentNotFoundException`
    `PermissionException`
    `AgentConnectionException`
    `java.io.IOException`
    `ConfigPropertyException`
    `AgentRemoteException`
  See Also:
    `pingAgent(org.hyperic.hq.authz.server.session.AuthzSubject, org.hyperic.hq.appdef.Agent)`

### pingAgent

    public long pingAgent(AuthzSubject subject,
                          Agent agent)
                   throws PermissionException,
                          AgentNotFoundException,
                          AgentConnectionException,
                          AgentRemoteException,
                          java.io.IOException,
                          ConfigPropertyException

  Pings the specified agent.

  Parameters:
    `subject` - The subject issuing the request.
    `aid` - The agent id.
  Returns:
    the time it took (in milliseconds) for the round-trip time of the request to the agent.
  Throws:
    `PermissionException` - if the subject does not have proper permissions to issue an agent bundle transfer.
    `java.io.FileNotFoundException` - if the agent bundle is not found on the HQ server.
    `java.io.IOException` - if an I/O error occurs, such as failing to calculate the file MD5 checksum.
    `AgentRemoteException` - if an exception occurs on the remote agent side.
    `AgentConnectionException` - if the connection to the agent fails.
    `AgentNotFoundException` - if no agent exists with the given agent id.
    `ConfigPropertyException` - if the server configuration cannot be retrieved.

### getOne

    public static org.hyperic.hq.appdef.shared.AgentManagerLocal getOne()

### ejbCreate

    public void ejbCreate()
                   throws javax.ejb.CreateException

  Throws:
    `javax.ejb.CreateException`

### ejbRemove

    public void ejbRemove()

  Specified by:
    `ejbRemove` in interface `javax.ejb.SessionBean`

### ejbActivate

    public void ejbActivate()

  Specified by:
    `ejbActivate` in interface `javax.ejb.SessionBean`

### ejbPassivate

    public void ejbPassivate()

  Specified by:
    `ejbPassivate` in interface `javax.ejb.SessionBean`

### setSessionContext

    public void setSessionContext(javax.ejb.SessionContext ctx)

  Specified by:
    `setSessionContext` in interface `javax.ejb.SessionBean`
  Overrides:
    `setSessionContext` in class `AppdefSessionEJB`

### getAgentTypeDAO

    protected AgentTypeDAO getAgentTypeDAO()

### getAgentReportStatusDAO

    protected AgentReportStatusDAO getAgentReportStatusDAO()

Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.