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

All Superinterfaces:
WSDMResource
All Known Subinterfaces:
AgreementFactoryClient
All Known Implementing Classes:
AgreementFactoryFacade, LocalAgreementFactoryClientImpl, LocalAgreementFactoryServiceImpl, RemoteAgreementFactoryClientImpl, RemoteAgreementFactoryServiceImpl

public interface AgreementFactoryService
extends WSDMResource

AgreementFactoryService The contract of a WSAG4J agreement factory service.

Author:
Oliver Waeldrich

Method Summary
 AgreementClient createAgreement(AgreementOffer offer)
          Creates a new agreement instance with the SLA management server.
 AgreementClient createPendingAgreement(AgreementOffer offer)
          Creates a pending agreement instance.
 AgreementClient createPendingAgreement(AgreementOffer offer, EndpointReferenceType acceptanceEPR)
          Creates a pending agreement instance.
 AgreementTemplateType[] getTemplates()
          Retrieves the templates for supported SLAs from the SLA management system.
 WsClient getWebServiceClient()
          Returns the web-service client used for communicating with the SLA management server.
 NegotiationClient initiateNegotiation(NegotiationContextType context)
          Initiates a new negotiation process.
 
Methods inherited from interface org.ogf.graap.wsag.api.client.WSDMResource
getResourceId
 

Method Detail

getWebServiceClient

WsClient getWebServiceClient()
Returns the web-service client used for communicating with the SLA management server.

Returns:
the web service client for this service.

getTemplates

AgreementTemplateType[] getTemplates()
                                     throws ResourceUnknownException,
                                            ResourceUnavailableException
Retrieves the templates for supported SLAs from the SLA management system.

Returns:
all templates exposed by this agreement factory instance
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

createAgreement

AgreementClient createAgreement(AgreementOffer offer)
                                throws AgreementFactoryException,
                                       ResourceUnknownException,
                                       ResourceUnavailableException
Creates a new agreement instance with the SLA management server.

Parameters:
offer - the agreement offer
Returns:
a client for the created agreement
Throws:
AgreementFactoryException - indicates that the agreement was rejected by the factory
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

createPendingAgreement

AgreementClient createPendingAgreement(AgreementOffer offer)
                                       throws AgreementFactoryException,
                                              ResourceUnknownException,
                                              ResourceUnavailableException
Creates a pending agreement instance. The decision whether to accept or reject the agreement is deferred.

Parameters:
offer - The agreement offer passed from the agreement initiator.
Returns:
An AgreementClient for the new created agreement.
Throws:
AgreementFactoryException - An error occurred during the the agreement creation. The agreement was rejected.
ResourceUnknownException - No pending agreement factory exists at the specified endpoint.
ResourceUnavailableException - The agreement factory at the specified endpoint is not accessible.

createPendingAgreement

AgreementClient createPendingAgreement(AgreementOffer offer,
                                       EndpointReferenceType acceptanceEPR)
                                       throws AgreementFactoryException,
                                              ResourceUnknownException,
                                              ResourceUnavailableException
Creates a pending agreement instance. The decision whether to accept or reject the agreement is deferred. Once the decision has been made the client is notified via the given notification endpoint.

Parameters:
offer - The agreement offer passed from the agreement initiator.
acceptanceEPR - An endpoint to an agreement acceptance instance.
Returns:
An AgreementClient for the new created agreement.
Throws:
AgreementFactoryException - An error occurred during the the agreement creation. The agreement was rejected.
ResourceUnknownException - No pending agreement factory exists at the specified endpoint.
ResourceUnavailableException - The agreement factory at the specified endpoint is not accessible.

initiateNegotiation

NegotiationClient initiateNegotiation(NegotiationContextType context)
                                      throws NegotiationFactoryException,
                                             ResourceUnknownException,
                                             ResourceUnavailableException
Initiates a new negotiation process.

Parameters:
context - the context for the negotiation to initialize
Returns:
the new initiated negotiation instance
Throws:
NegotiationFactoryException - indicates that the creation of a negotiation process was rejected
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable


Copyright © 2008-2012 Fraunhofer Institute SCAI. All Rights Reserved.