org.mobicents.xcap.client
Interface XcapClient

All Known Implementing Classes:
XcapClientImpl

public interface XcapClient


Method Summary
 XcapResponse delete(java.net.URI uri, Header[] additionalRequestHeaders, Credentials credentials)
          Deletes the content related the specified XCAP URI uri.
 XcapResponse deleteIfMatch(java.net.URI uri, java.lang.String eTag, Header[] additionalRequestHeaders, 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, Header[] additionalRequestHeaders, 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, Header[] additionalRequestHeaders, Credentials credentials)
          Retrieves the XML resource from the XCAP server, for the specified uri.
 CredentialsFactory getCredentialsFactory()
          Retrieves the request authentication credentials factory.
 HeaderFactory getHeaderFactory()
          Retrieves the request's header factory.
 XcapResponse put(java.net.URI uri, java.lang.String mimetype, byte[] content, Header[] additionalRequestHeaders, 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, Header[] additionalRequestHeaders, 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, Header[] additionalRequestHeaders, 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, Header[] additionalRequestHeaders, 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, Header[] additionalRequestHeaders, 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, Header[] additionalRequestHeaders, 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(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

delete

XcapResponse delete(java.net.URI uri,
                    Header[] additionalRequestHeaders,
                    Credentials credentials)
                    throws 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:
java.io.IOException

deleteIfMatch

XcapResponse deleteIfMatch(java.net.URI uri,
                           java.lang.String eTag,
                           Header[] additionalRequestHeaders,
                           Credentials credentials)
                           throws 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:
java.io.IOException

deleteIfNoneMatch

XcapResponse deleteIfNoneMatch(java.net.URI uri,
                               java.lang.String eTag,
                               Header[] additionalRequestHeaders,
                               Credentials credentials)
                               throws 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:
java.io.IOException

get

XcapResponse get(java.net.URI uri,
                 Header[] additionalRequestHeaders,
                 Credentials credentials)
                 throws 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:
java.io.IOException

getCredentialsFactory

CredentialsFactory getCredentialsFactory()
Retrieves the request authentication credentials factory.

Returns:

getHeaderFactory

HeaderFactory getHeaderFactory()
Retrieves the request's header factory.

Returns:

put

XcapResponse put(java.net.URI uri,
                 java.lang.String mimetype,
                 byte[] content,
                 Header[] additionalRequestHeaders,
                 Credentials credentials)
                 throws 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:
java.io.IOException

put

XcapResponse put(java.net.URI uri,
                 java.lang.String mimetype,
                 java.lang.String content,
                 Header[] additionalRequestHeaders,
                 Credentials credentials)
                 throws 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:
java.io.IOException

putIfMatch

XcapResponse putIfMatch(java.net.URI uri,
                        java.lang.String eTag,
                        java.lang.String mimetype,
                        byte[] content,
                        Header[] additionalRequestHeaders,
                        Credentials credentials)
                        throws 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:
java.io.IOException

putIfMatch

XcapResponse putIfMatch(java.net.URI uri,
                        java.lang.String eTag,
                        java.lang.String mimetype,
                        java.lang.String content,
                        Header[] additionalRequestHeaders,
                        Credentials credentials)
                        throws 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:
java.io.IOException

putIfNoneMatch

XcapResponse putIfNoneMatch(java.net.URI uri,
                            java.lang.String eTag,
                            java.lang.String mimetype,
                            byte[] content,
                            Header[] additionalRequestHeaders,
                            Credentials credentials)
                            throws 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:
java.io.IOException

putIfNoneMatch

XcapResponse putIfNoneMatch(java.net.URI uri,
                            java.lang.String eTag,
                            java.lang.String mimetype,
                            java.lang.String content,
                            Header[] additionalRequestHeaders,
                            Credentials credentials)
                            throws 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:
java.io.IOException

setAuthenticationCredentials

void setAuthenticationCredentials(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 -

shutdown

void shutdown()
Shutdown the client.


unsetAuthenticationCredentials

void unsetAuthenticationCredentials()
Unsets the authentication credentials.



Copyright © 2010. All Rights Reserved.