public class AdHocCommandModule<CTX extends Context> extends AbstractModule<CTX>
Modifier and Type | Class and Description |
---|---|
static interface |
AdHocCommandModule.ScriptCommandProcessor |
Modifier and Type | Field and Description |
---|---|
protected static String[] |
COMMAND_PATH |
protected AdHocCommandManager |
commandsManager |
protected static Criteria |
CRIT |
static String |
ID |
protected AdHocCommandModule.ScriptCommandProcessor |
scriptProcessor |
static String |
XMLNS |
context, log
Constructor and Description |
---|
AdHocCommandModule(AdHocCommandModule.ScriptCommandProcessor scriptProcessor) |
Modifier and Type | Method and Description |
---|---|
List<Element> |
getCommandListItems(JID senderJid,
JID toJid) |
String[] |
getFeatures()
Returns XMPP features offered by module.
|
Criteria |
getModuleCriteria()
Returns critera used by Component to select module to handle incoming
stanza.
|
List<Element> |
getScriptItems(String node,
JID stanzaTo,
JID stanzaFrom) |
void |
process(Packet packet)
Process incoming stanza.
|
protected void |
processScriptAdHoc(Packet packet) |
void |
register(AdHocCommand command) |
afterRegistration, beforeRegister, fireEvent, setContext, unregisterModule, write, write
protected static final String[] COMMAND_PATH
protected static final Criteria CRIT
public static final String ID
public static final String XMLNS
protected AdHocCommandManager commandsManager
protected AdHocCommandModule.ScriptCommandProcessor scriptProcessor
public AdHocCommandModule(AdHocCommandModule.ScriptCommandProcessor scriptProcessor)
public String[] getFeatures()
Module
null
.public Criteria getModuleCriteria()
Module
public void process(Packet packet) throws ComponentException
Module
packet
- received stanza
.ComponentException
- if stanza can't be processed correctly. ComponentException is
converted to error stanza and returned to stanza sender.protected void processScriptAdHoc(Packet packet)
public void register(AdHocCommand command)
Copyright © 2019 "Tigase, Inc.". All rights reserved.