|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.sip.xcap.BaseHttpXCapClient
net.java.sip.communicator.impl.protocol.sip.xcap.XCapClientImpl
public class XCapClientImpl
XCAP client implementation.
Compliant with rfc4825, rfc4826, rfc5025 and Presence Content XDM Specification v1.0
| Field Summary |
|---|
| Fields inherited from class net.java.sip.communicator.impl.protocol.sip.xcap.BaseHttpXCapClient |
|---|
HEADER_CONTENT_TYPE, HEADER_ETAG, HEADER_IF_NONE_MATCH, uri, userAddress, XCAP_ERROR_CONTENT_TYPE |
| Fields inherited from interface net.java.sip.communicator.impl.protocol.sip.xcap.XCapCapsClient |
|---|
CONTENT_TYPE, DOCUMENT_FORMAT |
| Fields inherited from interface net.java.sip.communicator.impl.protocol.sip.xcap.ResourceListsClient |
|---|
DOCUMENT_FORMAT, ELEMENT_CONTENT_TYPE, NAMESPACE, RESOURCE_LISTS_CONTENT_TYPE |
| Fields inherited from interface net.java.sip.communicator.impl.protocol.sip.xcap.PresRulesClient |
|---|
CONTENT_TYPE, DOCUMENT_FORMAT, NAMESPACE |
| Fields inherited from interface net.java.sip.communicator.impl.protocol.sip.xcap.PresContentClient |
|---|
CONTENT_TYPE, DOCUMENT_FORMAT, NAMESPACE |
| Constructor Summary | |
|---|---|
XCapClientImpl()
|
|
| Method Summary | |
|---|---|
protected void |
assertPresContentSupported()
Utility method throwing an exception if the pres-content is not supported. |
protected void |
assertPresRulesSupported()
Utility method throwing an exception if the pres-rules is not supported. |
protected void |
assertResourceListsSupported()
Utility method throwing an exception if the resource-lists is not supported. |
void |
connect(URI uri,
javax.sip.address.Address userAddress,
String username,
String password)
Connects user to XCap server. |
void |
deletePresContent(String imageName)
Deletes the pres-content from the server. |
void |
deletePresRules()
Deletes the pres-rules from the server. |
void |
deleteResourceLists()
Deletes the resource-lists from the server. |
void |
disconnect()
Disconnects user from the XCAP server. |
byte[] |
getImage(URI imageUri)
Gets image from the specified uri. |
ListType |
getList(String anchor)
Gets the resource-lists from the server. |
ContentType |
getPresContent(String imageName)
Gets the pres-content from the server. |
URI |
getPresContentImageUri(String imageName)
Gets the pres-content image uri. |
RulesetType |
getPresRules()
Gets the pres-rules from the server. |
ResourceListsType |
getResourceLists()
Gets the resource-lists from the server. |
XCapCapsType |
getXCapCaps()
Gets the xcap-caps from the server. |
boolean |
isPresContentSupported()
Indicates whether or not pres-rules is supported. |
boolean |
isPresRulesSupported()
Indicates whether or not pres-rules is supported. |
boolean |
isResourceListsSupported()
Indicates whether or not pres-rules is supported. |
void |
putPresContent(ContentType content,
String imageName)
Puts the pres-content to the server. |
void |
putPresRules(RulesetType presRules)
Puts the pres-rules to the server. |
void |
putResourceLists(ResourceListsType resourceLists)
Puts the resource-lists to the server. |
| Methods inherited from class net.java.sip.communicator.impl.protocol.sip.xcap.BaseHttpXCapClient |
|---|
assertConnected, delete, get, get, getResourceURI, getSingleHeaderValue, getTimeout, getUri, getUserName, getXCapErrorMessage, isConnected, put, setTimeout, showError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.java.sip.communicator.impl.protocol.sip.xcap.HttpXCapClient |
|---|
delete, get, getTimeout, getUri, getUserName, isConnected, put, setTimeout |
| Constructor Detail |
|---|
public XCapClientImpl()
| Method Detail |
|---|
public void connect(URI uri,
javax.sip.address.Address userAddress,
String username,
String password)
throws XCapException
connect in interface HttpXCapClientconnect in class BaseHttpXCapClienturi - the server location.userAddress - the URI of the user used for requestsusername - the user name.password - the user password.
XCapException - if there is some error during operation.public void disconnect()
disconnect in interface HttpXCapClientdisconnect in class BaseHttpXCapClient
public void putResourceLists(ResourceListsType resourceLists)
throws XCapException
putResourceLists in interface ResourceListsClientresourceLists - the resource-lists to be saved on the server.
IllegalStateException - if the user has not been connected, or
resource-lists is not supported.
XCapException - if there is some error during operation.
public ResourceListsType getResourceLists()
throws XCapException
getResourceLists in interface ResourceListsClientIllegalStateException - if the user has not been connected, or
resource-lists is not supported.
XCapException - if there is some error during operation.
public void deleteResourceLists()
throws XCapException
deleteResourceLists in interface ResourceListsClientIllegalStateException - if the user has not been connected, or
resource-lists is not supported.
XCapException - if there is some error during operation.
public ListType getList(String anchor)
throws XCapException
getList in interface ResourceListsClientanchor - reference to the list.
IllegalStateException - if the user has not been connected, or
resource-lists is not supported.
XCapException - if there is some error during operation.
public XCapCapsType getXCapCaps()
throws XCapException
getXCapCaps in interface XCapCapsClientIllegalStateException - if the user has not been connected.
XCapException - if there is some error during operation.
public RulesetType getPresRules()
throws XCapException
getPresRules in interface PresRulesClientIllegalStateException - if the user has not been connected, or
pres-rules is not supported.
XCapException - if there is some error during operation.
public void putPresRules(RulesetType presRules)
throws XCapException
putPresRules in interface PresRulesClientpresRules - the pres-rules to be saved on the server.
IllegalStateException - if the user has not been connected, or
pres-rules is not supported.
XCapException - if there is some error during operation.
public void deletePresRules()
throws XCapException
deletePresRules in interface PresRulesClientIllegalStateException - if the user has not been connected, or
pres-rules is not supported.
XCapException - if there is some error during operation.
public void putPresContent(ContentType content,
String imageName)
throws XCapException
putPresContent in interface PresContentClientcontent - the pres-content to be saved on the server.imageName - the image name under which pres-content would be saved.
IllegalStateException - if the user has not been connected, or
pres-content is not supported.
XCapException - if there is some error during operation.
public ContentType getPresContent(String imageName)
throws XCapException
getPresContent in interface PresContentClientimageName - the image name under which pres-content is saved.
IllegalStateException - if the user has not been connected, or
pres-content is not supported.
XCapException - if there is some error during operation.
public void deletePresContent(String imageName)
throws XCapException
deletePresContent in interface PresContentClientimageName - the image name under which pres-content is saved.
IllegalStateException - if the user has not been connected, or
pres-content is not supported.
XCapException - if there is some error during operation.public URI getPresContentImageUri(String imageName)
getPresContentImageUri in interface PresContentClientimageName - the image name under which pres-content is saved.
IllegalStateException - if the user has not been connected.
public byte[] getImage(URI imageUri)
throws XCapException
getImage in interface PresContentClientimageUri - the image uri.
XCapException - if there is some error during operation.protected void assertResourceListsSupported()
IllegalStateException - if the user is not connected.protected void assertPresRulesSupported()
IllegalStateException - if the user is not connected.protected void assertPresContentSupported()
IllegalStateException - if the user is not connected.public boolean isResourceListsSupported()
isResourceListsSupported in interface XCapClientpublic boolean isPresRulesSupported()
isPresRulesSupported in interface XCapClientpublic boolean isPresContentSupported()
isPresContentSupported in interface XCapClient
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||