org.aselect.system.sam.agent
Class SAMAgent

java.lang.Object
  extended by org.aselect.system.sam.agent.SAMAgent
Direct Known Subclasses:
ASelectAgentSAMAgent, ASelectSAMAgent, AuthSPSAMAgent

public class SAMAgent
extends java.lang.Object

The SAM Agent is used as a central location to retrieve an active resource.

Description:
SAM stands for Simple A-Select Management. SAM is designed to enable A-Select to work in a redundant envirnoment. The SAMAgent is the central component, for all other A-Select components, to obtain an active SAMResource. A SAMResource resembles, for example, an A-Select Server or a database.

Concurrency issues:
-

Author:
Alfa & Ariss

Constructor Summary
SAMAgent()
          Default constructor
 
Method Summary
 void destroy()
          Destroys all resourcegroups (SAMResourceGroups).
 SAMResource getActiveResource(java.lang.String sID)
          Gets an active resource from a paricular group.
 void init(ConfigManager oConfigManager, SystemLogger oSystemLogger)
          This function is to initialize the SAMAgent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAMAgent

public SAMAgent()
Default constructor

Method Detail

init

public void init(ConfigManager oConfigManager,
                 SystemLogger oSystemLogger)
          throws ASelectSAMException
This function is to initialize the SAMAgent.

Description:
Loads all configured resources within the 'samagent' config section in the Hashtable _htResourceGroups.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
oConfigManager - The section within the configuration file in which the parameters for the SAMAgent can be found.
oSystemLogger - the SystemLogger object that is the logging target
Throws:
ASelectSAMException - if no correct configuration was found

getActiveResource

public SAMResource getActiveResource(java.lang.String sID)
                              throws ASelectSAMException
Gets an active resource from a paricular group.

Description:
Returns the active resource from the resource group with the supplied id.

Concurrency issues:
-

Preconditions:
- sID != null

Postconditions:
-

Parameters:
sID - The identifier for a particular group of resources.
Returns:
The SAMResource object of an active resource.
Throws:
ASelectSAMException - if no active resource can be found

destroy

public void destroy()
Destroys all resourcegroups (SAMResourceGroups).

Description:
Destroys all SAMResourceGroups in the _htResourceGroups and removes them.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-



Copyright © 2008 SURFnet BV. All Rights Reserved.