Class Offer
java.lang.Object
org.jivesoftware.smackx.workgroup.agent.Offer
A class embodying the semantic agent chat offer; specific instances allow the acceptance or
rejecting of the offer.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept()
Accepts the offer.Returns the content of the offer.The date when the offer will expire.The meta-data associated with the offer.The session ID associated with the offer.Returns the userID that the offer originates from.Returns the JID of the user that made the offer request.The fully qualified name of the workgroup (e.g.support@example.com).boolean
Returns true if the agent accepted this offer.boolean
Return true if the agent rejected this offer.void
reject()
Rejects the offer.
-
Method Details
-
accept
Accepts the offer.- Throws:
SmackException.NotConnectedException
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
reject
Rejects the offer.- Throws:
SmackException.NotConnectedException
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
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
Returns the JID of the user that made the offer request.- Returns:
- the user's JID.
-
getWorkgroupName
The fully qualified name of the workgroup (e.g.support@example.com).- Returns:
- the name of the workgroup.
-
getExpiresDate
The date when the offer will expire. The agent mustaccept()
the offer before the expiration date or the offer will lapse and be routed to another agent. Alternatively, the agent canreject()
the offer at any time if they don't wish to accept it.- Returns:
- the date at which this offer expires.
-
getSessionID
The session ID associated with the offer.- Returns:
- the session id associated with the offer.
-
getMetaData
The meta-data associated with the offer.- Returns:
- the offer meta-data.
-
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
Returns true if the agent accepted this offer.- Returns:
- true if the agent accepted this offer.
-
isRejected
Return true if the agent rejected this offer.- Returns:
- true if the agent rejected this offer.
-