Class Agent
- java.lang.Object
-
- org.jivesoftware.smackx.workgroup.agent.Agent
-
public class Agent extends java.lang.Object
TheAgent
class is used to represent one agent in a Workgroup Queue.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Return the agents name.org.jxmpp.jid.Jid
getUser()
Return the agents JID.static java.util.Collection<java.lang.String>
getWorkgroups(org.jxmpp.jid.Jid serviceJID, org.jxmpp.jid.Jid agentJID, org.jivesoftware.smack.XMPPConnection connection)
void
setName(java.lang.String newName)
Changes the name of the agent in the server.
-
-
-
Method Detail
-
getWorkgroups
public static java.util.Collection<java.lang.String> getWorkgroups(org.jxmpp.jid.Jid serviceJID, org.jxmpp.jid.Jid agentJID, org.jivesoftware.smack.XMPPConnection connection) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
- Throws:
org.jivesoftware.smack.SmackException.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
-
getUser
public org.jxmpp.jid.Jid getUser()
Return the agents JID.- Returns:
- - the agents JID.
-
getName
public java.lang.String getName() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
Return the agents name.- Returns:
- - the agents name.
- Throws:
org.jivesoftware.smack.XMPPException.XMPPErrorException
- if there was an XMPP error returned.org.jivesoftware.smack.SmackException.NoResponseException
- if there was no response from the remote entity.org.jivesoftware.smack.SmackException.NotConnectedException
- if the XMPP connection is not connected.java.lang.InterruptedException
- if the calling thread was interrupted.
-
setName
public void setName(java.lang.String newName) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
Changes the name of the agent in the server. The server may have this functionality disabled for all the agents or for this agent in particular. If the agent is not allowed to change his name then an exception will be thrown with a service_unavailable error code.- Parameters:
newName
- the new name of the agent.- Throws:
org.jivesoftware.smack.XMPPException.XMPPErrorException
- if there was an XMPP error returned.org.jivesoftware.smack.SmackException.NoResponseException
- if there was no response from the remote entity.org.jivesoftware.smack.SmackException.NotConnectedException
- if the XMPP connection is not connected.java.lang.InterruptedException
- if the calling thread was interrupted.
-
-