org.ogf.graap.wsag.client.remote
Class RemoteAgreementServiceImpl

java.lang.Object
  extended by org.ogf.graap.wsag.client.remote.RemoteAgreementServiceImpl
All Implemented Interfaces:
AgreementService

public class RemoteAgreementServiceImpl
extends Object
implements AgreementService

Default implementation of an agreement service client.

Author:
Oliver Waeldrich

Constructor Summary
RemoteAgreementServiceImpl(WsrfResourceClient client)
           
 
Method Summary
 void destroy()
          Destroys agreement instance.
 String getAgreementId()
          Returns the id of the agreement instance.
 AgreementContextType getContext()
          Returns the context of the agreement instance.
 GuaranteeTermStateType[] getGuaranteeTermStates()
          Returns the state for the individual guarantee terms of the agreement instance.
 String getName()
          Returns the name of the agreement instance.
 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.
 WsClient getWebServiceClient()
          Returns the web-service client used for communication with the SLA management server.
 void terminate(TerminateInputType reason)
          Terminates the agreement instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteAgreementServiceImpl

public RemoteAgreementServiceImpl(WsrfResourceClient client)
Parameters:
client - the WSRF client to use
Method Detail

getWebServiceClient

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

Specified by:
getWebServiceClient in interface AgreementService
Returns:
the web service client for this service.

getContext

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

Specified by:
getContext in interface AgreementService
Returns:
the agreement context
Throws:
ResourceUnavailableException - the remote resource is unavailable

getGuaranteeTermStates

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

Specified by:
getGuaranteeTermStates in interface AgreementService
Returns:
the guarantee term states
Throws:
ResourceUnavailableException - the remote resource is unavailable

getAgreementId

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

Specified by:
getAgreementId in interface AgreementService
Returns:
the agreement id
Throws:
ResourceUnavailableException - the remote resource is unavailable

getName

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

Specified by:
getName in interface AgreementService
Returns:
the agreement name
Throws:
ResourceUnavailableException - the remote resource is unavailable

getServiceTermStates

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

Specified by:
getServiceTermStates in interface AgreementService
Returns:
the service term states
Throws:
ResourceUnavailableException - the remote resource is unavailable

getState

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

Specified by:
getState in interface AgreementService
Returns:
the agreement state
Throws:
ResourceUnavailableException - the remote resource is unavailable

getTerms

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

Specified by:
getTerms in interface AgreementService
Returns:
the agreement terms
Throws:
ResourceUnavailableException - the remote resource is unavailable

terminate

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

Specified by:
terminate in interface AgreementService
Parameters:
reason - a domain-specific termination reason
Throws:
ResourceUnavailableException - the remote resource is unavailable

destroy

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

Specified by:
destroy in interface AgreementService
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable


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