org.mobicents.xcap.client
Interface XcapClient

All Known Implementing Classes:
XcapClientImpl

public interface XcapClient


Method Summary
 XcapResponse delete(java.net.URI uri, org.apache.http.Header[] additionalRequestHeaders, org.apache.http.auth.Credentials credentials)
          Deletes the content related the specified XCAP URI uri.
 XcapResponse deleteIfMatch(java.net.URI uri, java.lang.String eTag, org.apache.http.Header[] additionalRequestHeaders, org.apache.http.auth.Credentials credentials)
          Deletes the content related the specified XCAP URI uri, if the specified ETag matches the current one on the server.
 XcapResponse deleteIfNoneMatch(java.net.URI uri, java.lang.String eTag, org.apache.http.Header[] additionalRequestHeaders, org.apache.http.auth.Credentials credentials)
          Deletes the content related the specified XCAP URI uri, if the specified ETag does not matches the current one on the server.
 XcapResponse get(java.net.URI uri, org.apache.http.Header[] additionalRequestHeaders, org.apache.http.auth.Credentials credentials)
          Retrieves the XML resource from the XCAP server, for the specified uri.
 XcapResponse put(java.net.URI uri, java.lang.String mimetype, byte[] content, org.apache.http.Header[] additionalRequestHeaders, org.apache.http.auth.Credentials credentials)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri.
 XcapResponse put(java.net.URI uri, java.lang.String mimetype, java.lang.String content, org.apache.http.Header[] additionalRequestHeaders, org.apache.http.auth.Credentials credentials)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri.
 XcapResponse putIfMatch(java.net.URI uri, java.lang.String eTag, java.lang.String mimetype, byte[] content, org.apache.http.Header[] additionalRequestHeaders, org.apache.http.auth.Credentials credentials)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri, if the specified ETag matches the current one on the server.
 XcapResponse putIfMatch(java.net.URI uri, java.lang.String eTag, java.lang.String mimetype, java.lang.String content, org.apache.http.Header[] additionalRequestHeaders, org.apache.http.auth.Credentials credentials)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri, if the specified ETag matches the current one on the server.
 XcapResponse putIfNoneMatch(java.net.URI uri, java.lang.String eTag, java.lang.String mimetype, byte[] content, org.apache.http.Header[] additionalRequestHeaders, org.apache.http.auth.Credentials credentials)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri, if the specified ETag does not matches the current one on the server.
 XcapResponse putIfNoneMatch(java.net.URI uri, java.lang.String eTag, java.lang.String mimetype, java.lang.String content, org.apache.http.Header[] additionalRequestHeaders, org.apache.http.auth.Credentials credentials)
          Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri, if the specified ETag does not matches the current one on the server.
 void setAuthenticationCredentials(org.apache.http.auth.Credentials credentials)
          Sets the global authentication credentials, those will be used when there are no credentials for the request.
 void shutdown()
          Shutdown the client.
 void unsetAuthenticationCredentials()
          Unsets the authentication credentials.
 

Method Detail

setAuthenticationCredentials

void setAuthenticationCredentials(org.apache.http.auth.Credentials credentials)
Sets the global authentication credentials, those will be used when there are no credentials for the request. Those credentials are applied to any host.

Parameters:
credentials -

unsetAuthenticationCredentials

void unsetAuthenticationCredentials()
Unsets the authentication credentials.


shutdown

void shutdown()
Shutdown the client.


get

XcapResponse get(java.net.URI uri,
                 org.apache.http.Header[] additionalRequestHeaders,
                 org.apache.http.auth.Credentials credentials)
                 throws org.apache.http.client.ClientProtocolException,
                        java.io.IOException
Retrieves the XML resource from the XCAP server, for the specified uri.

Parameters:
uri - the request uri
additionalRequestHeaders - additional headers to include in the XCAP request
credentials - authentication credentials, can be null for requests that don't need authentication.
Returns:
Throws:
org.apache.http.client.ClientProtocolException
java.io.IOException

put

XcapResponse put(java.net.URI uri,
                 java.lang.String mimetype,
                 java.lang.String content,
                 org.apache.http.Header[] additionalRequestHeaders,
                 org.apache.http.auth.Credentials credentials)
                 throws org.apache.http.client.ClientProtocolException,
                        java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri.

Parameters:
uri - the request uri
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - additional headers to include in the XCAP request
credentials - authentication credentials, can be null for requests that don't need authentication.
Returns:
Throws:
org.apache.http.client.ClientProtocolException
java.io.IOException

put

XcapResponse put(java.net.URI uri,
                 java.lang.String mimetype,
                 byte[] content,
                 org.apache.http.Header[] additionalRequestHeaders,
                 org.apache.http.auth.Credentials credentials)
                 throws org.apache.http.client.ClientProtocolException,
                        java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri.

Parameters:
uri - the request uri
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - additional headers to include in the XCAP request
credentials - authentication credentials, can be null for requests that don't need authentication.
Returns:
Throws:
org.apache.http.client.ClientProtocolException
java.io.IOException

putIfMatch

XcapResponse putIfMatch(java.net.URI uri,
                        java.lang.String eTag,
                        java.lang.String mimetype,
                        java.lang.String content,
                        org.apache.http.Header[] additionalRequestHeaders,
                        org.apache.http.auth.Credentials credentials)
                        throws org.apache.http.client.ClientProtocolException,
                               java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri, if the specified ETag matches the current one on the server.

Parameters:
uri - the request uri
eTag -
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - additional headers to include in the XCAP request
credentials - authentication credentials, can be null for requests that don't need authentication.
Returns:
Throws:
org.apache.http.client.ClientProtocolException
java.io.IOException

putIfMatch

XcapResponse putIfMatch(java.net.URI uri,
                        java.lang.String eTag,
                        java.lang.String mimetype,
                        byte[] content,
                        org.apache.http.Header[] additionalRequestHeaders,
                        org.apache.http.auth.Credentials credentials)
                        throws org.apache.http.client.ClientProtocolException,
                               java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri, if the specified ETag matches the current one on the server.

Parameters:
uri - the request uri
eTag -
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - additional headers to include in the XCAP request
credentials - authentication credentials, can be null for requests that don't need authentication.
Returns:
Throws:
org.apache.http.client.ClientProtocolException
java.io.IOException

putIfNoneMatch

XcapResponse putIfNoneMatch(java.net.URI uri,
                            java.lang.String eTag,
                            java.lang.String mimetype,
                            java.lang.String content,
                            org.apache.http.Header[] additionalRequestHeaders,
                            org.apache.http.auth.Credentials credentials)
                            throws org.apache.http.client.ClientProtocolException,
                                   java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri, if the specified ETag does not matches the current one on the server.

Parameters:
uri - the request uri
eTag -
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - additional headers to include in the XCAP request
credentials - authentication credentials, can be null for requests that don't need authentication.
Returns:
Throws:
org.apache.http.client.ClientProtocolException
java.io.IOException

putIfNoneMatch

XcapResponse putIfNoneMatch(java.net.URI uri,
                            java.lang.String eTag,
                            java.lang.String mimetype,
                            byte[] content,
                            org.apache.http.Header[] additionalRequestHeaders,
                            org.apache.http.auth.Credentials credentials)
                            throws org.apache.http.client.ClientProtocolException,
                                   java.io.IOException
Puts the specified content in the XCAP Server, in the XCAP URI pointed by the uri, if the specified ETag does not matches the current one on the server.

Parameters:
uri - the request uri
eTag -
mimetype - the mimetype of the content to put, for document each XCAP App Usage defines their own mimetype, but for elements and attributes you can use ElementResource and AttributeResource static MIMETYPE fields.
content -
additionalRequestHeaders - additional headers to include in the XCAP request
credentials - authentication credentials, can be null for requests that don't need authentication.
Returns:
Throws:
org.apache.http.client.ClientProtocolException
java.io.IOException

delete

XcapResponse delete(java.net.URI uri,
                    org.apache.http.Header[] additionalRequestHeaders,
                    org.apache.http.auth.Credentials credentials)
                    throws org.apache.http.client.ClientProtocolException,
                           java.io.IOException
Deletes the content related the specified XCAP URI uri.

Parameters:
uri - the request uri
additionalRequestHeaders - additional headers to include in the XCAP request
credentials - authentication credentials, can be null for requests that don't need authentication.
Returns:
Throws:
org.apache.http.client.ClientProtocolException
java.io.IOException

deleteIfMatch

XcapResponse deleteIfMatch(java.net.URI uri,
                           java.lang.String eTag,
                           org.apache.http.Header[] additionalRequestHeaders,
                           org.apache.http.auth.Credentials credentials)
                           throws org.apache.http.client.ClientProtocolException,
                                  java.io.IOException
Deletes the content related the specified XCAP URI uri, if the specified ETag matches the current one on the server.

Parameters:
uri - the request uri
eTag -
additionalRequestHeaders - additional headers to include in the XCAP request
credentials - authentication credentials, can be null for requests that don't need authentication.
Returns:
Throws:
org.apache.http.client.ClientProtocolException
java.io.IOException

deleteIfNoneMatch

XcapResponse deleteIfNoneMatch(java.net.URI uri,
                               java.lang.String eTag,
                               org.apache.http.Header[] additionalRequestHeaders,
                               org.apache.http.auth.Credentials credentials)
                               throws org.apache.http.client.ClientProtocolException,
                                      java.io.IOException
Deletes the content related the specified XCAP URI uri, if the specified ETag does not matches the current one on the server.

Parameters:
uri - the request uri
eTag -
additionalRequestHeaders - additional headers to include in the XCAP request
credentials - authentication credentials, can be null for requests that don't need authentication.
Returns:
Throws:
org.apache.http.client.ClientProtocolException
java.io.IOException


Copyright © 2010. All Rights Reserved.