|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ogf.graap.wsag.server.engine.GenericNegotiation
public class GenericNegotiation
GenericNegotiation implements the default negotiation behavior in the WSAG4J framework. It validates incoming offers with respect to adherence to creation constraints defined in the originating templates, with respect to negotiation constraints defined in the parent offers, and invokes the appropriate negotiation strategies for incoming offers.
| Field Summary | |
|---|---|
static String |
CRITICAL_EXTENSIONS
Critical extensions key |
static String |
NEGOTIATION_CONTEXT
Negotiation context key |
static String |
NON_CRITICAL_EXTENSIONS
Non-critical extensions key |
| Constructor Summary | |
|---|---|
GenericNegotiation(IAgreementFactory factory,
TemplateRegistry registry,
NegotiationContextType context)
|
|
GenericNegotiation(IAgreementFactory factory,
TemplateRegistry registry,
NegotiationContextType context,
Map<String,Object> negotiationProperties)
|
|
| Method Summary | |
|---|---|
void |
advertise(NegotiationOfferType[] quotes,
org.apache.xmlbeans.XmlObject[] noncriticalExtensions)
Advertises the state change of particular agreement offers to a negotiation participator. |
AgreementTemplateType[] |
getNegotiableTemplates()
Default implementation for retrieving negotiable templates from the associated agreement factory. |
NegotiationContextType |
getNegotiationContext()
Returns the context of an negotiation instance. |
NegotiationOfferType[] |
getNegotiationOffers()
This method returns a list of negotiation offers. |
AgreementFactoryAction |
loadAction(NegotiationOfferType quote)
Loads the appropriate negotiation strategy for an incoming quote. |
NegotiationOfferType[] |
negotiate(NegotiationOfferType[] counterOffers,
org.apache.xmlbeans.XmlObject[] noncriticalExtensions)
Negotiates acceptable agreement offers with a negotiation participator. |
void |
terminate()
terminates a negotiation process |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CRITICAL_EXTENSIONS
public static final String NON_CRITICAL_EXTENSIONS
public static final String NEGOTIATION_CONTEXT
| Constructor Detail |
|---|
public GenericNegotiation(IAgreementFactory factory,
TemplateRegistry registry,
NegotiationContextType context)
factory - The factory that agreement offers are negotiated for.registry - The registry to lookup the factory actions.context - The context in which the negotiation is created in.
public GenericNegotiation(IAgreementFactory factory,
TemplateRegistry registry,
NegotiationContextType context,
Map<String,Object> negotiationProperties)
factory - The factory that agreement offers are negotiated for.registry - The registry to lookup the factory actions.context - The context in which the negotiation is created in.negotiationProperties - Additional parameters that were passed from the negotiation factory.| Method Detail |
|---|
public void advertise(NegotiationOfferType[] quotes,
org.apache.xmlbeans.XmlObject[] noncriticalExtensions)
throws NegotiationException
advertise in interface Negotiationquotes - 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.noncriticalExtensions - 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.
NegotiationException - indicates an exception sending the advertise messageNegotiation.advertise(NegotiationOfferType[], XmlObject[])
public NegotiationOfferType[] negotiate(NegotiationOfferType[] counterOffers,
org.apache.xmlbeans.XmlObject[] noncriticalExtensions)
throws NegotiationException
negotiate in interface NegotiationcounterOffers - 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.noncriticalExtensions - 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.
NegotiationException - indicates an exception during the negotiation processNegotiation.negotiate(NegotiationOfferType[], XmlObject[])public NegotiationContextType getNegotiationContext()
getNegotiationContext in interface NegotiationNegotiation.getNegotiationContext()public NegotiationOfferType[] getNegotiationOffers()
getNegotiationOffers in interface NegotiationNegotiation.getNegotiationOffers()public void terminate()
Negotiation
terminate in interface NegotiationNegotiation.terminate()public AgreementFactoryAction loadAction(NegotiationOfferType quote)
quote - negotiation offer
AgreementFactoryAction for this quotepublic AgreementTemplateType[] getNegotiableTemplates()
getNegotiableTemplates in interface NegotiationNegotiation.getNegotiableTemplates(),
TemplateRegistry.getNegotiableTemplates()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||