Smack

org.jivesoftware.smackx.workgroup.agent
Class Offer

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

public class Offer
extends Object

A class embodying the semantic agent chat offer; specific instances allow the acceptance or rejecting of the offer.

Author:
Matt Tucker, Derek DeMoro

Constructor Summary
Offer(XMPPConnection conn, WorkgroupSession workgroupSession, String userID, String workgroupName, Date expiresDate, String sessionID, Map metaData)
          Creates a new offer.
 
Method Summary
 void accept()
          Accepts the offer.
 Date getExpiresDate()
          The date when this offer will expire.
 Map getMetaData()
          Returns the meta-data associated with this offer.
 String getSessionID()
          The session ID associated with this offer.
 String getUserID()
          Returns the XMPP address of the user from which the offer originates (eg jsmith@example.com/WebClient).
 String getWorkgroupName()
          The fully qualified name of the workgroup (eg support@example.com) that this offer is from.
 void reject()
          Rejects the offer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Offer

public Offer(XMPPConnection conn,
             WorkgroupSession workgroupSession,
             String userID,
             String workgroupName,
             Date expiresDate,
             String sessionID,
             Map metaData)
Creates a new offer.

Parameters:
conn - the XMPP connection with which the issuing session was created.
workgroupSession - the agent session instance through which this offer was issued.
userID - the XMPP address of the user from which the offer originates.
workgroupName - the fully qualified name of the workgroup.
expiresDate - the date at which this offer expires.
sessionID - the session id associated with the offer.
metaData - the metadata associated with the offer.
Method Detail

accept

public void accept()
Accepts the offer.


reject

public void reject()
Rejects the offer.


getUserID

public String getUserID()
Returns the XMPP address of the user from which the offer originates (eg jsmith@example.com/WebClient). For example, if the user jsmith initiates a support request by joining the workgroup queue, then this user ID will be jsmith's address.

Returns:
the XMPP address of the user from which the offer originates.

getWorkgroupName

public String getWorkgroupName()
The fully qualified name of the workgroup (eg support@example.com) that this offer is from.

Returns:
the name of the workgroup this offer is from.

getExpiresDate

public Date getExpiresDate()
The date when this offer will expire. The agent must accept() the offer before the expiration date or the offer will lapse and be routed to another agent. Alternatively, the agent can reject() the offer at any time if they don't wish to accept it..

Returns:
the date at which this offer expires.

getSessionID

public String getSessionID()
The session ID associated with this offer.

Returns:
the session ID associated with this offer.

getMetaData

public Map getMetaData()
Returns the meta-data associated with this offer.

Returns:
the offer meta-data.

Smack

Copyright © 2003 Jive Software.