|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ogf.graap.wsag.client.local.LocalAgreementFactoryClientImpl
public class LocalAgreementFactoryClientImpl
An implementation of the Client API for local invocation of an agreement factory.
Constructor Summary | |
---|---|
LocalAgreementFactoryClientImpl(AgreementFactory factory)
Creates a client for local invocation of an agreement factory. |
Method Summary | |
---|---|
AgreementFactoryClient |
clone()
Returns a copy of the client. |
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. |
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()
Retrieves the templates for supported SLAs from the SLA management system. |
WsClient |
getWebServiceClient()
Returns the web service client used for communication with the SLA management system. |
NegotiationClient |
initiateNegotiation(NegotiationContextType context)
Initiates a new negotiation process. |
boolean |
isUsingTrace()
Determines whether or not a client prints the web-service messages to the console. |
AgreementClient[] |
listAgreements()
Lists the agreement instances of a particular agreement factory. |
void |
setProperties(Properties properties)
Sets the properties used for the web-service client. |
void |
setTrace(boolean trace)
Sets the clients trace mode. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalAgreementFactoryClientImpl(AgreementFactory factory)
factory
- the factory objectMethod Detail |
---|
public AgreementFactoryClient clone() throws CloneNotSupportedException
clone
in interface AgreementFactoryClient
clone
in class Object
CloneNotSupportedException
- indicates that the particular client implementation does not support cloningpublic WsClient getWebServiceClient()
getWebServiceClient
in interface AgreementFactoryClient
getWebServiceClient
in interface AgreementFactoryService
getWebServiceClient
in interface AgreementRegistryService
AgreementFactoryClient.getWebServiceClient()
public AgreementClient createAgreement(AgreementOffer offer) throws AgreementFactoryException, ResourceUnknownException, ResourceUnavailableException
createAgreement
in interface AgreementFactoryService
offer
- the agreement offer
AgreementFactoryException
- indicates that the agreement was rejected by the factory
ResourceUnknownException
- the remote resource is unknown
ResourceUnavailableException
- the remote resource is unavailablepublic 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 EndpointReferenceType getEndpoint()
getEndpoint
in interface WsClient
public Properties getProperties()
getProperties
in interface WsClient
public String getResourceId() throws ResourceUnknownException, ResourceUnavailableException
getResourceId
in interface WSDMResource
ResourceUnknownException
- the remote resource is unknown
ResourceUnavailableException
- the remote resource is unavailablepublic ISecurityProperties getSecurityProperties()
getSecurityProperties
in interface WsClient
public AgreementTemplateType getTemplate(String name, String id) throws ResourceUnknownException, ResourceUnavailableException
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 AgreementTemplateType[] getTemplates() throws ResourceUnknownException, ResourceUnavailableException
getTemplates
in interface AgreementFactoryService
ResourceUnknownException
- the remote resource is unknown
ResourceUnavailableException
- the remote resource is unavailablepublic boolean isUsingTrace()
isUsingTrace
in interface WsClient
public AgreementClient[] listAgreements() throws ResourceUnknownException, ResourceUnavailableException
listAgreements
in interface AgreementRegistryService
ResourceUnknownException
- the remote resource is unknown
ResourceUnavailableException
- the remote resource is unavailablepublic void setProperties(Properties properties)
setProperties
in interface WsClient
properties
- Sets the properties for this clientpublic void setTrace(boolean trace)
setTrace
in interface WsClient
trace
- true, if the web service client should traces incoming/outgoing messages.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |