Class Offer


  • public class Offer
    extends java.lang.Object
    A class embodying the semantic agent chat offer; specific instances allow the acceptance or rejecting of the offer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept()
      Accepts the offer.
      OfferContent getContent()
      Returns the content of the offer.
      java.util.Date getExpiresDate()
      The date when the offer will expire.
      java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getMetaData()
      The meta-data associated with the offer.
      java.lang.String getSessionID()
      The session ID associated with the offer.
      Jid getUserID()
      Returns the userID that the offer originates from.
      Jid getUserJID()
      Returns the JID of the user that made the offer request.
      Jid getWorkgroupName()
      The fully qualified name of the workgroup (eg support@example.com).
      boolean isAccepted()
      Returns true if the agent accepted this offer.
      boolean isRejected()
      Return true if the agent rejected this offer.
      void reject()
      Rejects the offer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getUserID

        public Jid getUserID()
        Returns the userID that the offer originates from. In most cases, the userID will simply be the JID of the requesting user. However, users can also manually specify a userID for their request. In that case, that value will be returned.
        Returns:
        the userID of the user from which the offer originates.
      • getUserJID

        public Jid getUserJID()
        Returns the JID of the user that made the offer request.
        Returns:
        the user's JID.
      • getWorkgroupName

        public Jid getWorkgroupName()
        The fully qualified name of the workgroup (eg support@example.com).
        Returns:
        the name of the workgroup.
      • getExpiresDate

        public java.util.Date getExpiresDate()
        The date when the 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 java.lang.String getSessionID()
        The session ID associated with the offer.
        Returns:
        the session id associated with the offer.
      • getMetaData

        public java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getMetaData()
        The meta-data associated with the offer.
        Returns:
        the offer meta-data.
      • getContent

        public OfferContent getContent()
        Returns the content of the offer. The content explains the reason for the offer (e.g. user request, transfer)
        Returns:
        the content of the offer.
      • isAccepted

        public boolean isAccepted()
        Returns true if the agent accepted this offer.
        Returns:
        true if the agent accepted this offer.
      • isRejected

        public boolean isRejected()
        Return true if the agent rejected this offer.
        Returns:
        true if the agent rejected this offer.