org.ogf.graap.wsag.api
Interface Negotiation

All Known Implementing Classes:
GenericNegotiation

public interface Negotiation

This interface defines the contract of a concrete Negotiation implementation.
A negotiation instance implements the state pattern. its behavior changes depending on the negotiation type, which is either negotiation or re-negotiation.

Author:
owaeld

Method Summary
 void advertise(NegotiationOfferType[] quotes, org.apache.xmlbeans.XmlObject[] nocriticalExtensions)
          Advertises the state change of particular agreement offers to a negotiation participator.
 AgreementTemplateType[] getNegotiableTemplates()
          Returns the templates for SLAs that are supported by this negotiation instance.
 NegotiationContextType getNegotiationContext()
          Returns the context of an negotiation instance.
 NegotiationOfferType[] getNegotiationOffers()
          This method returns a list of negotiation offers.
 NegotiationOfferType[] negotiate(NegotiationOfferType[] quotes, org.apache.xmlbeans.XmlObject[] nocriticalExtensions)
          Negotiates acceptable agreement offers with a negotiation participator.
 void terminate()
          terminates a negotiation process
 

Method Detail

getNegotiationContext

NegotiationContextType getNegotiationContext()
Returns the context of an negotiation instance. The context is defined when a new negotiation instance is initiated. It defines the type of the negotiation process (negotiation or re-negotiation), the liability, identifies the participating parties, defines constraints on the negotiation process, etc.

Returns:
The context of the negotiation instance.

getNegotiableTemplates

AgreementTemplateType[] getNegotiableTemplates()
Returns the templates for SLAs that are supported by this negotiation instance. Negotiable templates are dynamically generated. If an agreement factory supports negotiation for a specific SLA, it implements a corresponding negotiation strategy. For each SLA where a negotiation strategy is implemented, the corresponding template is returned by the negotiation instance. In case of SLA re-negotiation, the negotiation instance may dynamically generate a set of negotiable templates in order to guide the negotiation participator in the re-negotiation process.

Returns:
a set of negotiable templates

getNegotiationOffers

NegotiationOfferType[] getNegotiationOffers()
This method returns a list of negotiation offers. These offers represent the offers exchanged in the negotiation process. Only offers that are still valid (e.g. which are not expired) are returned.

Returns:
A set of exchanged negotiation offers.

negotiate

NegotiationOfferType[] negotiate(NegotiationOfferType[] quotes,
                                 org.apache.xmlbeans.XmlObject[] nocriticalExtensions)
                                 throws NegotiationException
Negotiates acceptable agreement offers with a negotiation participator. This method implements an offer/counter-offer model for bilateral agreement negotiation.

Parameters:
quotes - The negotiation quotes represent offers of a negotiation participator. Each negotiation quote relates to a originating quote in this negotiation, and is based on an agreement template exposed by the agreement factory associated with this negotiation instance.
nocriticalExtensions - A negotiation implementation SHOULD obey the non-critical extensions if possible. If the extensions are not known or the implementation is not willing to support them, they can be ignored. Alternatively, the negotiation implementation MAY raise an exception.
Returns:
Returns a set of negotiation counter offers. Each counter offer must refer to a negotiation offer passed as input. For each offer, one or more counter offers are created.
Throws:
NegotiationException - indicates an exception during the negotiation process

advertise

void advertise(NegotiationOfferType[] quotes,
               org.apache.xmlbeans.XmlObject[] nocriticalExtensions)
               throws NegotiationException
Advertises the state change of particular agreement offers to a negotiation participator. This method implements an notification mechanism in bilateral agreement negotiations.

Parameters:
quotes - The negotiation quotes represent offers of a negotiation participator. Each negotiation quote relates to a originating quote in this negotiation, and is based on an agreement template exposed by the agreement factory associated with this negotiation instance.
nocriticalExtensions - A negotiation implementation SHOULD obey the non-critical extensions if possible. If the extensions are not known or the implementation is not willing to support them, they can be ignored. Alternatively, the negotiation implementation MAY raise an exception.
Throws:
NegotiationException - indicates an exception sending the advertise message

terminate

void terminate()
terminates a negotiation process



Copyright © 2008-2012. All Rights Reserved.