@Bean(name="AgentOfferModule", active=true) public class OfferModule extends AbstractModule
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
writer, XMLNSEMPTY_FEATURES| Constructor and Description |
|---|
OfferModule() |
| Modifier and Type | Method and Description |
|---|---|
String[] |
getFeatures()
Returns XMPP features offered by module.
|
Criteria |
getModuleCriteria()
Returns critera used by Component to select module to handle incoming stanza.
|
void |
process(Packet packet)
Process incoming stanza.
|
void |
sendAgentInvitation(BareJID roomJID,
Agent agent,
User user,
Queue queue,
String reason) |
void |
sendOffer(User user,
Agent toAgent,
int timeout) |
void |
sendOfferRevoke(User user,
Agent toAgent,
String reason)
Send revocation of earlier offer to chat to a user.
|
write, writepublic static final String ID
public String[] getFeatures()
Modulenull.public Criteria getModuleCriteria()
Modulepublic void process(Packet packet) throws ComponentException, TigaseStringprepException
Modulepacket - received stanza.ComponentException - if stanza can't be processed correctly. ComponentException is converted to error
stanza and returned to stanza sender.TigaseStringprepException - if there was an error during stringprep processing.public void sendAgentInvitation(BareJID roomJID, Agent agent, User user, Queue queue, String reason) throws TigaseStringprepException
TigaseStringprepExceptionpublic void sendOffer(User user, Agent toAgent, int timeout) throws TigaseStringprepException
TigaseStringprepExceptionpublic void sendOfferRevoke(User user, Agent toAgent, String reason) throws TigaseStringprepException
user - user which offer is revoked.toAgent - agent to send revocation to him.reason - free form text explaining the reason the offer was revoked.TigaseStringprepException - in case of invalid JID.Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.