Smack

org.jivesoftware.smackx.workgroup.agent
Class Agent

java.lang.Object
  extended by org.jivesoftware.smackx.workgroup.agent.Agent

public class Agent
extends Object

The Agent class is used to represent one agent in a Workgroup Queue.

Author:
Derek DeMoro

Method Summary
 String getName()
          Return the agents name.
 String getUser()
          Return the agents JID
static Collection getWorkgroups(String serviceJID, String agentJID, XMPPConnection connection)
           
 void setName(String newName)
          Changes the name of the agent in the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWorkgroups

public static Collection getWorkgroups(String serviceJID,
                                       String agentJID,
                                       XMPPConnection connection)
                                throws XMPPException
Throws:
XMPPException

getUser

public String getUser()
Return the agents JID

Returns:
- the agents JID.

getName

public String getName()
               throws XMPPException
Return the agents name.

Returns:
- the agents name.
Throws:
XMPPException

setName

public void setName(String newName)
             throws XMPPException
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:
XMPPException - if the agent is not allowed to change his name or no response was obtained from the server.

Smack

Copyright © 2003-2007 Jive Software.