org.ogf.graap.wsag.samples.pendingagreement
Class NegotiatePendingAgreementAction

java.lang.Object
  extended by org.ogf.graap.wsag.server.actions.AbstractNegotiationAction
      extended by org.ogf.graap.wsag.samples.pendingagreement.NegotiatePendingAgreementAction
All Implemented Interfaces:
IActionHandler, INegotiationAction

public class NegotiatePendingAgreementAction
extends AbstractNegotiationAction

NegotiatePendingAgreementAction A negotiation action for a pending agreement.

Author:
Oliver Waeldrich

Constructor Summary
NegotiatePendingAgreementAction()
           
 
Method Summary
 void initialize()
          Initializes the negotiation action.
 NegotiationOfferType[] negotiate(NegotiationOfferType quote, Map<String,Object> context)
          Negotiates a pending agreement.
 
Methods inherited from class org.ogf.graap.wsag.server.actions.AbstractNegotiationAction
getHandlerContext, getNegotiationContext, setHandlerContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NegotiatePendingAgreementAction

public NegotiatePendingAgreementAction()
Method Detail

initialize

public void initialize()
                throws ActionInitializationException
Initializes the negotiation action. Default implementation of action initialization. Subclasses may overwrite this method in order to provide a custom initialization of a handler. Initializes an action handler. This method is called when a agreement factory action initializes its action handlers. It is called once during the the engine initialization.

Specified by:
initialize in interface IActionHandler
Overrides:
initialize in class AbstractNegotiationAction
Throws:
ActionInitializationException - Indicates an error during handler initialization.

negotiate

public NegotiationOfferType[] negotiate(NegotiationOfferType quote,
                                        Map<String,Object> context)
                                 throws NegotiationException
Negotiates a pending agreement. Negotiates an agreement offer. For each negotiation offer, one or more counter proposals may be created. A negotiation request can comprise multiple negotiation offers. These offers are processed sequentially, sharing a common invocation context.

Parameters:
quote - the negotiation offer to process
context - the invocation context
Returns:
a set of counter offers
Throws:
NegotiationException - indicates an error during the negotiation process


Copyright © 2008-2012. All Rights Reserved.