Package org.jivesoftware.smackx.usertune
Class UserTuneManager
- java.lang.Object
-
- org.jivesoftware.smack.Manager
-
- org.jivesoftware.smackx.usertune.UserTuneManager
-
public final class UserTuneManager extends org.jivesoftware.smack.Manager
Entry point for Smacks API for XEP-0118: User Tune.
To publish a UserTune, please usepublishUserTune(UserTuneElement)
method. This will publish the node.
To stop publishing a UserTune, please useclearUserTune()
method. This will send a disabling publish signal.
To add a UserTune listener in order to remain updated with other users UserTune, useaddUserTuneListener(PepEventListener)
method.
To link a UserTuneElement withMessage
, use 'message.addExtension(userTuneElement)'.
An example to illustrate is provided inside UserTuneElementTest inside the test package.- See Also:
- XEP-0118: User Tune
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
USERTUNE_NODE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addUserTuneListener(PepEventListener<UserTuneElement> listener)
void
clearUserTune()
static UserTuneManager
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
void
publishUserTune(UserTuneElement userTuneElement)
boolean
removeUserTuneListener(PepEventListener<UserTuneElement> listener)
-
-
-
Field Detail
-
USERTUNE_NODE
public static final java.lang.String USERTUNE_NODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstanceFor
public static UserTuneManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection) throws org.jivesoftware.smack.SmackException.NotLoggedInException
- Throws:
org.jivesoftware.smack.SmackException.NotLoggedInException
-
clearUserTune
public void clearUserTune() throws org.jivesoftware.smack.SmackException.NotLoggedInException, PubSubException.NotALeafNodeException, org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.SmackException.NotConnectedException, org.jivesoftware.smack.XMPPException.XMPPErrorException, java.lang.InterruptedException
- Throws:
org.jivesoftware.smack.SmackException.NotLoggedInException
PubSubException.NotALeafNodeException
org.jivesoftware.smack.SmackException.NoResponseException
org.jivesoftware.smack.SmackException.NotConnectedException
org.jivesoftware.smack.XMPPException.XMPPErrorException
java.lang.InterruptedException
-
publishUserTune
public void publishUserTune(UserTuneElement userTuneElement) throws org.jivesoftware.smack.SmackException.NotLoggedInException, PubSubException.NotALeafNodeException, org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.SmackException.NotConnectedException, org.jivesoftware.smack.XMPPException.XMPPErrorException, java.lang.InterruptedException
- Throws:
org.jivesoftware.smack.SmackException.NotLoggedInException
PubSubException.NotALeafNodeException
org.jivesoftware.smack.SmackException.NoResponseException
org.jivesoftware.smack.SmackException.NotConnectedException
org.jivesoftware.smack.XMPPException.XMPPErrorException
java.lang.InterruptedException
-
addUserTuneListener
public boolean addUserTuneListener(PepEventListener<UserTuneElement> listener)
-
removeUserTuneListener
public boolean removeUserTuneListener(PepEventListener<UserTuneElement> listener)
-
-