|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ogf.graap.wsag.client.impl.AgreementFactoryFacade
public class AgreementFactoryFacade
A client side facade to an agreement factory service and the associated agreement registry.
Constructor Summary | |
---|---|
AgreementFactoryFacade(AgreementFactoryService factoryClient,
AgreementRegistryService registryClient,
ISecurityProperties securityProperties)
Creates a new instance of the facade. |
Method Summary | |
---|---|
AgreementFactoryClient |
clone()
Creates s copy of this AgreementFactoryClient. |
AgreementClient |
createAgreement(AgreementOffer offer)
Creates a new agreement instance. |
AgreementClient |
createPendingAgreement(AgreementOffer offer)
Creates a new pending agreement instance. |
AgreementClient |
createPendingAgreement(AgreementOffer offer,
EndpointReferenceType acceptanceEPR)
Creates a new pending agreement instance. |
AgreementFactoryService |
getAgreementFactoryClient()
|
AgreementRegistryService |
getAgreementRegistryClient()
|
EndpointReferenceType |
getEndpoint()
Returns the endpoint of the client instance. |
Properties |
getProperties()
Returns the properties used by the web-service client. |
String |
getResourceId()
Returns the WSDM id of a web-service resource. |
ISecurityProperties |
getSecurityProperties()
Returns the security properties used by the web-service client. |
AgreementTemplateType |
getTemplate(String name,
String id)
Returns a template with a particular name and id from the server, or null if the requested
template does not exist. |
AgreementTemplateType[] |
getTemplates()
Returns the templates supported by this factory. |
WsClient |
getWebServiceClient()
Returns the web service client used for communication with the SLA management system. |
NegotiationClient |
initiateNegotiation(NegotiationContextType context)
Initiates a Negotiation. |
boolean |
isUsingTrace()
Determines whether or not a client prints the web-service messages to the console. |
AgreementClient[] |
listAgreements()
Lists all agreements of this factory. |
void |
setProperties(Properties properties)
Sets the properties used for the web-service client. |
void |
setTrace(boolean trace)
Turns trace on/off. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AgreementFactoryFacade(AgreementFactoryService factoryClient, AgreementRegistryService registryClient, ISecurityProperties securityProperties)
factoryClient
- the factory client instanceregistryClient
- the registry client instancesecurityProperties
- the security properties to useMethod Detail |
---|
public AgreementTemplateType[] getTemplates() throws ResourceUnknownException, ResourceUnavailableException
getTemplates
in interface AgreementFactoryService
ResourceUnknownException
- the remote resource is unknown
ResourceUnavailableException
- the remote resource is unavailablepublic AgreementClient createAgreement(AgreementOffer offer) throws AgreementFactoryException, ResourceUnknownException, ResourceUnavailableException
createAgreement
in interface AgreementFactoryService
offer
- the offer to create the agreement for
AgreementFactoryException
- the agreement offer was rejected by the factory
ResourceUnavailableException
- the requested agreement factory resource is unavailable
ResourceUnknownException
- the requested agreement factory resource is unknownpublic AgreementClient createPendingAgreement(AgreementOffer offer) throws AgreementFactoryException, ResourceUnknownException, ResourceUnavailableException
createPendingAgreement
in interface AgreementFactoryService
offer
- The agreement offer passed from the agreement initiator.
AgreementClient
for the new created agreement.
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.public AgreementClient createPendingAgreement(AgreementOffer offer, EndpointReferenceType acceptanceEPR) throws AgreementFactoryException, ResourceUnknownException, ResourceUnavailableException
createPendingAgreement
in interface AgreementFactoryService
offer
- The agreement offer passed from the agreement initiator.acceptanceEPR
- An endpoint to an agreement acceptance instance.
AgreementClient
for the new created agreement.
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.public NegotiationClient initiateNegotiation(NegotiationContextType context) throws NegotiationFactoryException, ResourceUnknownException, ResourceUnavailableException
initiateNegotiation
in interface AgreementFactoryService
context
- the context for the negotiation to initialize
NegotiationFactoryException
- indicates that the creation of a negotiation process was rejected
ResourceUnknownException
- the remote resource is unknown
ResourceUnavailableException
- the remote resource is unavailablepublic String getResourceId() throws ResourceUnknownException, ResourceUnavailableException
getResourceId
in interface WSDMResource
ResourceUnknownException
- the remote resource is unknown
ResourceUnavailableException
- the remote resource is unavailablepublic AgreementTemplateType getTemplate(String name, String id) throws ResourceUnknownException, ResourceUnavailableException
AgreementFactoryClient
null
if the requested
template does not exist.
getTemplate
in interface AgreementFactoryClient
name
- the name of the requested templateid
- the id of the requested template
ResourceUnknownException
- the remote resource is unknown
ResourceUnavailableException
- the remote resource is unavailablepublic AgreementFactoryClient clone() throws CloneNotSupportedException
clone
in interface AgreementFactoryClient
clone
in class Object
CloneNotSupportedException
- this particular client implementation does not support cloningpublic AgreementClient[] listAgreements() throws ResourceUnknownException, ResourceUnavailableException
listAgreements
in interface AgreementRegistryService
ResourceUnavailableException
- the requested agreement factory resource is unavailable
ResourceUnknownException
- the requested agreement factory resource is unknownpublic void setTrace(boolean trace)
setTrace
in interface WsClient
trace
- turns trace on/off.public boolean isUsingTrace()
WsClient
isUsingTrace
in interface WsClient
public Properties getProperties()
WsClient
getProperties
in interface WsClient
public void setProperties(Properties properties)
WsClient
setProperties
in interface WsClient
properties
- The properties to set.public EndpointReferenceType getEndpoint()
WsClient
getEndpoint
in interface WsClient
public ISecurityProperties getSecurityProperties()
WsClient
getSecurityProperties
in interface WsClient
public WsClient getWebServiceClient()
AgreementFactoryClient
getWebServiceClient
in interface AgreementFactoryClient
getWebServiceClient
in interface AgreementFactoryService
getWebServiceClient
in interface AgreementRegistryService
public AgreementFactoryService getAgreementFactoryClient()
public AgreementRegistryService getAgreementRegistryClient()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |