org.ogf.graap.wsag.client.api
Interface NegotiationClient

All Known Implementing Classes:
LocalNegotiationClient, NegotiationClientImpl, RestNegotiationClient, WsrfNegotiationClient

public interface NegotiationClient

Client interface for perfoming dynamic negotiation processes with a WSAG4J server.

Author:
hrasheed

Field Summary
static ClientLocator<NegotiationClient> FACTORY
          Default builder.
 
Method Summary
 void advertise(NegotiationOfferType[] offers)
          Advertises a set of negotiation offers.
 NegotiationClient clone()
          Returns a copy of the client.
 void destroy()
          Destroys this web service object.
 AgreementTemplateType[] getNegotiableTemplates()
          A negotiation instance supports zero or more templates that can be used to create negotiation offers.
 NegotiationContextType getNegotiationContext()
          Returns the context of this negotiation process.
 NegotiationOfferType getNegotiationOffer(String offerID)
          Returns the Negotiation Offer with the given offer id
 NegotiationOfferType[] getNegotiationOffers()
          Returns a history of exchanged offers in this negotiation process.
 RemoteClient getRemoteClient()
          Returns the web-service client used for communication with the SLA management server.
 NegotiationOfferType[] negotiate(NegotiationOfferType[] offers)
          Negotiates a set of agreement offers.
 void terminate()
          Terminates a negotiation.
 

Field Detail

FACTORY

static final ClientLocator<NegotiationClient> FACTORY
Default builder.

Method Detail

getRemoteClient

RemoteClient getRemoteClient()
Returns the web-service client used for communication with the SLA management server.

Returns:
the web service client for this service.

getNegotiationContext

NegotiationContextType getNegotiationContext()
                                             throws ResourceUnknownException,
                                                    ResourceUnavailableException
Returns the context of this negotiation process.

Returns:
the negotiation context
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getNegotiableTemplates

AgreementTemplateType[] getNegotiableTemplates()
                                               throws ResourceUnknownException,
                                                      ResourceUnavailableException
A negotiation instance supports zero or more templates that can be used to create negotiation offers. In case of a negotiation process, these templates are a subset of the templates offered by an agreement factory. Only these templates are returned for which a proper negotiation strategy is implemented. in case of agreement re negotiation, a negotiation instance may return one ore more templates to bootstrap the negotiation process.

Returns:
the negotiable templates
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getNegotiationOffers

NegotiationOfferType[] getNegotiationOffers()
                                            throws ResourceUnknownException,
                                                   ResourceUnavailableException
Returns a history of exchanged offers in this negotiation process.

Returns:
the offers exchanged in this negotiation
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

negotiate

NegotiationOfferType[] negotiate(NegotiationOfferType[] offers)
                                 throws NegotiationException,
                                        ResourceUnknownException,
                                        ResourceUnavailableException
Negotiates a set of agreement offers.

Parameters:
offers - the offers to negotiate
Returns:
a set of counter offers
Throws:
NegotiationException - an error occured processing the negotiation request
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

advertise

void advertise(NegotiationOfferType[] offers)
               throws NegotiationException,
                      ResourceUnknownException,
                      ResourceUnavailableException
Advertises a set of negotiation offers.

Parameters:
offers - the offers to advertise
Throws:
NegotiationException - an error occured processing the negotiation request
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

destroy

void destroy()
             throws ResourceUnknownException,
                    ResourceUnavailableException
Destroys this web service object.

Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getNegotiationOffer

NegotiationOfferType getNegotiationOffer(String offerID)
                                         throws ResourceUnknownException,
                                                ResourceUnavailableException
Returns the Negotiation Offer with the given offer id

Parameters:
offerID - the offerID of the negotiation offer to retrieve
Returns:
the negotiation offer with the given offer id
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

terminate

void terminate()
               throws ResourceUnknownException,
                      ResourceUnavailableException
Terminates a negotiation.

Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

clone

NegotiationClient clone()
                        throws CloneNotSupportedException
Returns a copy of the client.

Returns:
the cloned NegotiationClient
Throws:
CloneNotSupportedException - indicates that a particular client implementation does not support cloning


Copyright © 2008-2012. All Rights Reserved.