|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ogf.graap.wsag.client.remote.RemoteAgreementFactoryClientImpl
public class RemoteAgreementFactoryClientImpl
RemoteAgreementFactoryClientImpl
Constructor Summary | |
---|---|
RemoteAgreementFactoryClientImpl(EndpointReferenceType epr,
ISecurityProperties securityProperties)
Creates a new agreement factory client for a given endpoint using the given security properties. |
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 with the given context. |
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 RemoteAgreementFactoryClientImpl(EndpointReferenceType epr, ISecurityProperties securityProperties)
epr
- the agreement factory endpointsecurityProperties
- the client security propertiesMethod 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
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 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
AgreementFactoryClient
null
if the requested
template does not exist.
getTemplate
in interface AgreementFactoryClient
name
- the requested template nameid
- the requested template id
ResourceUnknownException
- the remote resource is unknown
ResourceUnavailableException
- the remote resource is unavailableAgreementFactoryFacade.getTemplate(String, String)
public 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.public NegotiationClient initiateNegotiation(NegotiationContextType context) throws NegotiationFactoryException, ResourceUnknownException, ResourceUnavailableException
initiateNegotiation
in interface AgreementFactoryService
context
- the negotiation context
NegotiationFactoryException
- The negotiation process was not initiated.
ResourceUnknownException
- the remote resource is unknown
ResourceUnavailableException
- the remote resource is unavailableAgreementFactoryFacade.initiateNegotiation(NegotiationContextType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |