Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.sip.xcap
Interface HttpXCapClient

All Known Subinterfaces:
XCapClient
All Known Implementing Classes:
BaseHttpXCapClient, XCapClientImpl

public interface HttpXCapClient

HTTP XCAP client interface.

Compliant with rfc4825

Author:
Grigorii Balutsel

Method Summary
 void connect(URI uri, javax.sip.address.Address userAddress, String username, String password)
          Connects user to XCAP server.
 XCapHttpResponse delete(XCapResourceId resourceId)
          Deletes the resource from the server.
 void disconnect()
          Disconnects user from the XCAP server.
 XCapHttpResponse get(XCapResourceId resourceId)
          Gets the resource from the server.
 int getTimeout()
          Gets operation timeout.
 URI getUri()
          Gets the XCAP server location.
 String getUserName()
          Gets connected user name.
 boolean isConnected()
          Checks if user is connected to the XCAP server.
 XCapHttpResponse put(XCapResource resource)
          Puts the resource to the server.
 void setTimeout(int timeout)
          Sets operation timeout.
 

Method Detail

connect

void connect(URI uri,
             javax.sip.address.Address userAddress,
             String username,
             String password)
             throws XCapException
Connects user to XCAP server.

Parameters:
uri - the server location.
userAddress - the URI of the user used for requests
username - the user name.
password - the user password.
Throws:
XCapException - if there is some error during operation.

disconnect

void disconnect()
Disconnects user from the XCAP server.


isConnected

boolean isConnected()
Checks if user is connected to the XCAP server.

Returns:
true if user is connected.

get

XCapHttpResponse get(XCapResourceId resourceId)
                     throws XCapException
Gets the resource from the server.

Parameters:
resourceId - resource identifier.
Returns:
the server response.
Throws:
IllegalStateException - if the user has not been connected.
XCapException - if there is some error during operation.

put

XCapHttpResponse put(XCapResource resource)
                     throws XCapException
Puts the resource to the server.

Parameters:
resource - the resource to be saved on the server.
Returns:
the server response.
Throws:
IllegalStateException - if the user has not been connected.
XCapException - if there is some error during operation.

delete

XCapHttpResponse delete(XCapResourceId resourceId)
                        throws XCapException
Deletes the resource from the server.

Parameters:
resourceId - resource identifier.
Returns:
the server response.
Throws:
IllegalStateException - if the user has not been connected.
XCapException - if there is some error during operation.

getUserName

String getUserName()
Gets connected user name.

Returns:
user name.

getUri

URI getUri()
Gets the XCAP server location.

Returns:
server location.

getTimeout

int getTimeout()
Gets operation timeout.

Returns:
operation timeout.

setTimeout

void setTimeout(int timeout)
Sets operation timeout.

Parameters:
timeout - operation timeout.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.