org.ogf.graap.wsag.client.wsrf.impl
Class WsrfResourceClient

java.lang.Object
  extended by org.ogf.graap.wsag.client.api.RemoteClient
      extended by org.ogf.graap.wsag.client.wsrf.impl.WsrfResourceClient
Direct Known Subclasses:
WsrfAgreementFactoryRegistryClient, WsrfAgreementFactoryService, WsrfAgreementRegistryService

public class WsrfResourceClient
extends RemoteClient

AbstractClient

Author:
Oliver Waeldrich

Field Summary
static EndpointReferenceType ANONYMOUS_EPR
          Definition of an anonymous SOAP sender EPR.
static String EXTRA_HEADERS
          Deprecated. 
 
Constructor Summary
WsrfResourceClient(EndpointReferenceType destination, Properties properties, ISecurityProperties securityProperties)
          Creates a WSRFResourceClient with the given endpoint and the provided security properties.
 
Method Summary
 void deleteResourceProperty(QName qname)
           
 void destroy()
           
static Axis2SoapClient getDefaultSOAPClient()
           
 EndpointReferenceType getEndpoint()
           
 Element[] getMultipleResourceProperties(QName[] qnames)
          Retrieves multiple resource properties from a WSRF resource.
 Properties getProperties()
          Returns the properties used by the web-service client.
 Element[] getResourceProperty(QName qname)
          Retrieves a single resource property from a WSRF resource.
 Element getResourcePropertyDocument()
          Retrieves a resource property document from a WSRF resource
 ISecurityProperties getSecurityProperties()
          Returns the security properties used by the web-service client.
 Element invoke(String action, Element soapBody)
          Invokes an action on a WSRF resource
static boolean isUseDefaultSOAPClient()
           
 boolean isUsingTrace()
          Determines whether or not a client prints the web-service messages to the console.
 Node[] queryResourceProperties(String query, String dialect)
          Queries multiple resource properties from a WSRF resource.
static void setDefaultSOAPClient(Axis2SoapClient defaultSOAPClient)
           
 void setProperties(Properties properties)
          Sets the properties used for the web-service client.
 void setResourceProperties(org.apache.muse.ws.resource.properties.set.SetRequest request)
          Sets a resource property.
 Date setTerminationTime(Date time)
          Sets the termination time for a WSRF resource.
 void setTrace(boolean trace)
          Sets the clients trace mode.
static void setUseDefaultSOAPClient(boolean useDefaultSOAPClient)
           
 void updateResourceProperty(QName qname, Object[] values)
          Updates a resource property.
 
Methods inherited from class org.ogf.graap.wsag.client.api.RemoteClient
getRemoteReference, setSecurityProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANONYMOUS_EPR

public static final EndpointReferenceType ANONYMOUS_EPR
Definition of an anonymous SOAP sender EPR.


EXTRA_HEADERS

@Deprecated
public static final String EXTRA_HEADERS
Deprecated. 
Key to lookup extra header fields.

See Also:
Constant Field Values
Constructor Detail

WsrfResourceClient

public WsrfResourceClient(EndpointReferenceType destination,
                          Properties properties,
                          ISecurityProperties securityProperties)
Creates a WSRFResourceClient with the given endpoint and the provided security properties.

Parameters:
destination - the WSRF resource endpoint
securityProperties - the security properties to use
Method Detail

getDefaultSOAPClient

public static Axis2SoapClient getDefaultSOAPClient()
Returns:
the defaultSOAPClient

setDefaultSOAPClient

public static void setDefaultSOAPClient(Axis2SoapClient defaultSOAPClient)
Parameters:
defaultSOAPClient - the default SOAP client to set

isUseDefaultSOAPClient

public static boolean isUseDefaultSOAPClient()
Returns:
the useDefaultSOAPClient

setUseDefaultSOAPClient

public static void setUseDefaultSOAPClient(boolean useDefaultSOAPClient)
Parameters:
useDefaultSOAPClient - the useDefaultSOAPClient to set

getProperties

public Properties getProperties()
Description copied from class: RemoteClient
Returns the properties used by the web-service client.

Overrides:
getProperties in class RemoteClient
Returns:
Returns the properties.

setProperties

public void setProperties(Properties properties)
Description copied from class: RemoteClient
Sets the properties used for the web-service client.

Overrides:
setProperties in class RemoteClient
Parameters:
properties - The properties to set.

getSecurityProperties

public ISecurityProperties getSecurityProperties()
Description copied from class: RemoteClient
Returns the security properties used by the web-service client.

Overrides:
getSecurityProperties in class RemoteClient
Returns:
the securityProperties

getEndpoint

public EndpointReferenceType getEndpoint()
Returns:
Returns the endpoint reference for the service.

deleteResourceProperty

public void deleteResourceProperty(QName qname)
                            throws org.apache.muse.ws.addressing.soap.SoapFault
Parameters:
qname - the name of the resource property to delete
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - indicates an error that occurred while deleting the resource property
See Also:
WsResourceClient.deleteResourceProperty(javax.xml.namespace.QName)

destroy

public void destroy()
             throws org.apache.muse.ws.addressing.soap.SoapFault
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - indicates an error while destroying the WS resource
See Also:
WsResourceClient.destroy()

getMultipleResourceProperties

public Element[] getMultipleResourceProperties(QName[] qnames)
                                        throws org.apache.muse.ws.addressing.soap.SoapFault
Retrieves multiple resource properties from a WSRF resource.

Parameters:
qnames - the QNames of the resource properties
Returns:
the retrieved resource properties
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - indicates an error while retrieving the resource properties
See Also:
WsResourceClient.getMultipleResourceProperties(javax.xml.namespace.QName[])

getResourceProperty

public Element[] getResourceProperty(QName qname)
                              throws org.apache.muse.ws.addressing.soap.SoapFault
Retrieves a single resource property from a WSRF resource.

Parameters:
qname - the QName of the resource property
Returns:
the retrieved resource property
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - indicates an error while retrieving the resource property
See Also:
WsResourceClient.getResourceProperty(javax.xml.namespace.QName)

getResourcePropertyDocument

public Element getResourcePropertyDocument()
                                    throws org.apache.muse.ws.addressing.soap.SoapFault
Retrieves a resource property document from a WSRF resource

Returns:
the resource property document
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - indicates an error while retrieving the resource properties document
See Also:
WsResourceClient.getResourcePropertyDocument()

isUsingTrace

public boolean isUsingTrace()
Description copied from class: RemoteClient
Determines whether or not a client prints the web-service messages to the console.

Overrides:
isUsingTrace in class RemoteClient
Returns:
if the client trace the messages or not
See Also:
isUsingTrace()

queryResourceProperties

public Node[] queryResourceProperties(String query,
                                      String dialect)
                               throws org.apache.muse.ws.addressing.soap.SoapFault
Queries multiple resource properties from a WSRF resource.

Parameters:
query - the query
dialect - the query dialect (e.g. XPath)
Returns:
the retrieved resource properties
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - indicates an error while querying the resource properties
See Also:
WsResourceClient.queryResourceProperties(java.lang.String, java.lang.String)

setResourceProperties

public void setResourceProperties(org.apache.muse.ws.resource.properties.set.SetRequest request)
                           throws org.apache.muse.ws.addressing.soap.SoapFault
Sets a resource property.

Parameters:
request - the request object
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - indicates an error while setting the resource property
See Also:
WsResourceClient.setResourceProperties(org.apache.muse.ws.resource.properties.set.SetRequest)

setTerminationTime

public Date setTerminationTime(Date time)
                        throws org.apache.muse.ws.addressing.soap.SoapFault
Sets the termination time for a WSRF resource.

Parameters:
time - the termination time
Returns:
the scheduled termination time
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - indicates an error while setting the termination time
See Also:
WsResourceClient.setTerminationTime(java.util.Date)

setTrace

public void setTrace(boolean trace)
Description copied from class: RemoteClient
Sets the clients trace mode.

Overrides:
setTrace in class RemoteClient
Parameters:
trace - toggles the trace capabilities
See Also:
setTrace(boolean)

updateResourceProperty

public void updateResourceProperty(QName qname,
                                   Object[] values)
                            throws org.apache.muse.ws.addressing.soap.SoapFault
Updates a resource property.

Parameters:
qname - the name of the resource property to update
values - the value(s) of the property
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - indicates an error while updating the resource property
See Also:
WsResourceClient.updateResourceProperty(javax.xml.namespace.QName, java.lang.Object[])

invoke

public Element invoke(String action,
                      Element soapBody)
               throws org.apache.muse.ws.addressing.soap.SoapFault
Invokes an action on a WSRF resource

Parameters:
action - the WSA action
soapBody - the SOAP body to send
Returns:
the SOAP response
Throws:
org.apache.muse.ws.addressing.soap.SoapFault - indicates an error while invoking the SOAP client
See Also:
AbstractResourceClient.invoke(java.lang.String, org.w3c.dom.Element)


Copyright © 2008-2012. All Rights Reserved.