org.ogf.graap.wsag.server.monitoring
Class AgreementMonitor

java.lang.Object
  extended by org.ogf.graap.wsag.server.monitoring.AgreementMonitor

public class AgreementMonitor
extends Object

WSAG4JAgreementMonitor Monitors the service term states of an agreement instance and evaluates the guarantee term states for guarantees defined in the agreement instance.

Author:
Oliver Waeldrich

Constructor Summary
AgreementMonitor()
           
 
Method Summary
 AbstractAgreementType getAgreementInstance()
           
 IMonitoringContext getMonitoringContext()
           
 void setAgreementInstance(AbstractAgreementType agreementInstance)
           
 void setMonitoringContext(IMonitoringContext monitoringContext)
           
 void updateStates()
          Updates the states of the associated agreement instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgreementMonitor

public AgreementMonitor()
Method Detail

getAgreementInstance

public AbstractAgreementType getAgreementInstance()
Returns:
the agreementInstance

setAgreementInstance

public void setAgreementInstance(AbstractAgreementType agreementInstance)
Parameters:
agreementInstance - the agreementInstance to set

getMonitoringContext

public IMonitoringContext getMonitoringContext()
Returns:
the monitoringContext

setMonitoringContext

public void setMonitoringContext(IMonitoringContext monitoringContext)
Parameters:
monitoringContext - the monitoringContext to set

updateStates

public void updateStates()
                  throws Exception
Updates the states of the associated agreement instance. First, the service term states are updated by using the registered monitoring handler. In a second step, all guarantee terms are evaluated and updated. When the monitoring cycle is completed, the resource property document of the agreement instance is updated with the results. The monitoring handler are invoked in the same order as they are registered.

Throws:
Exception - indicates an error while updating the states


Copyright © 2008-2012. All Rights Reserved.