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

All Known Implementing Classes:
AgreementClientImpl, LocalAgreementClient, RestAgreementClient, WsrfAgreementClient

public interface AgreementClient

Client interface of a agreement service implementation. Each implementation uses a specific remote technology, depending on the technology a specific remote client is returned.

Author:
Oliver Waeldrich

Field Summary
static ClientLocator<AgreementClient> FACTORY
          Default builder.
 
Method Summary
 AgreementClient clone()
          Returns a copy of the client.
 void destroy()
          Destroys agreement instance.
 String getAgreementId()
          Returns the id of the agreement instance.
 AgreementContextType getContext()
          Returns the context of the agreement instance.
 GuaranteeTermStateType getGuaranteeTermState(String name)
          Returns the guarantee term with the given name.
 GuaranteeTermStateType[] getGuaranteeTermStates()
          Returns the state for the individual guarantee terms of the agreement instance.
 String getName()
          Returns the name of the agreement instance.
 RemoteClient getRemoteClient()
          Returns the web-service client used for communication with the SLA management server.
 AgreementPropertiesType getResourceProperties()
          Returns the resource properties of the agreement instance.
 ServiceTermStateType getServiceTermState(String name)
          Returns the service description term with the given name.
 ServiceTermStateType[] getServiceTermStates()
          Returns the state for the individual service terms of the agreement instance.
 AgreementStateType getState()
          Returns the state of the agreement instance.
 TermTreeType getTerms()
          Returns the terms of the agreement instance.
 void terminate()
          Terminates an agreement.
 void terminate(TerminateInputType reason)
          Terminates the agreement instance.
 

Field Detail

FACTORY

static final ClientLocator<AgreementClient> 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.

getName

String getName()
               throws ResourceUnknownException,
                      ResourceUnavailableException
Returns the name of the agreement instance.

Returns:
the agreement name
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getAgreementId

String getAgreementId()
                      throws ResourceUnknownException,
                             ResourceUnavailableException
Returns the id of the agreement instance.

Returns:
the agreement id
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getContext

AgreementContextType getContext()
                                throws ResourceUnknownException,
                                       ResourceUnavailableException
Returns the context of the agreement instance.

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

getTerms

TermTreeType getTerms()
                      throws ResourceUnknownException,
                             ResourceUnavailableException
Returns the terms of the agreement instance.

Returns:
the agreement terms
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

terminate

void terminate(TerminateInputType reason)
               throws ResourceUnknownException,
                      ResourceUnavailableException
Terminates the agreement instance.

Parameters:
reason - a domain-specific termination reason
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getState

AgreementStateType getState()
                            throws ResourceUnknownException,
                                   ResourceUnavailableException
Returns the state of the agreement instance.

Returns:
the agreement state
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getGuaranteeTermStates

GuaranteeTermStateType[] getGuaranteeTermStates()
                                                throws ResourceUnknownException,
                                                       ResourceUnavailableException
Returns the state for the individual guarantee terms of the agreement instance.

Returns:
the guarantee term states
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getServiceTermStates

ServiceTermStateType[] getServiceTermStates()
                                            throws ResourceUnknownException,
                                                   ResourceUnavailableException
Returns the state for the individual service terms of the agreement instance.

Returns:
the service term states
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

destroy

void destroy()
             throws ResourceUnknownException,
                    ResourceUnavailableException
Destroys agreement instance.

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

getServiceTermState

ServiceTermStateType getServiceTermState(String name)
                                         throws ResourceUnknownException,
                                                ResourceUnavailableException
Returns the service description term with the given name.

Parameters:
name - the name of the service description term to retrieve
Returns:
the service description term with the given name
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getGuaranteeTermState

GuaranteeTermStateType getGuaranteeTermState(String name)
                                             throws ResourceUnknownException,
                                                    ResourceUnavailableException
Returns the guarantee term with the given name.

Parameters:
name - the name of the guarantee term to retrieve
Returns:
the guarantee term with the given name
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getResourceProperties

AgreementPropertiesType getResourceProperties()
                                              throws ResourceUnknownException,
                                                     ResourceUnavailableException
Returns the resource properties of the agreement instance.

Returns:
the agreement resource properties
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

terminate

void terminate()
               throws ResourceUnknownException,
                      ResourceUnavailableException
Terminates an agreement.

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

clone

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

Returns:
the cloned AgreementClient
Throws:
CloneNotSupportedException - indicates that the client implementation does not support cloning


Copyright © 2008-2012. All Rights Reserved.