Package tigase.component.modules.impl
Class AdHocCommandModule
java.lang.Object
tigase.component.modules.AbstractModule
tigase.component.modules.impl.AdHocCommandModule
- All Implemented Interfaces:
Module,Initializable
- Direct Known Subclasses:
AdHocCommandMonitorModule
@Bean(name="commands",
active=true)
public class AdHocCommandModule
extends AbstractModule
implements Initializable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String[]protected AdHocCommandManagerprotected static final Criteriastatic final Stringstatic final StringFields inherited from class tigase.component.modules.AbstractModule
eventBus, log, writerFields inherited from interface tigase.component.modules.Module
EMPTY_FEATURES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetCommandListItems(JID senderJid, JID toJid) String[]Returns XMPP features offered by module.Returns critera used by Component to select module to handle incoming stanza.getScriptItems(String node, JID stanzaTo, JID stanzaFrom) voidMethod will be called, when bean will be created, configured and ready to use.voidProcess incoming stanza.protected voidprocessScriptAdHoc(Packet packet) voidregister(AdHocCommand command) voidsetCommandsManager(AdHocCommandManager commandsManager) voidsetScriptProcessor(AdHocCommandModule.ScriptCommandProcessor scriptProcessor) Methods inherited from class tigase.component.modules.AbstractModule
fireEvent, getEventBus, getWriter, setEventBus, setWriter, write, write
-
Field Details
-
ID
- See Also:
-
XMLNS
- See Also:
-
COMMAND_PATH
-
CRIT
-
commandsManager
-
scriptProcessor
-
-
Constructor Details
-
AdHocCommandModule
public AdHocCommandModule()
-
-
Method Details
-
getCommandListItems
-
getCommandsManager
-
setCommandsManager
-
getFeatures
Description copied from interface:ModuleReturns XMPP features offered by module. Features will be returned by Service Discovery.- Specified by:
getFeaturesin interfaceModule- Returns:
- array of features or
null.
-
getModuleCriteria
Description copied from interface:ModuleReturns critera used by Component to select module to handle incoming stanza.- Specified by:
getModuleCriteriain interfaceModule- Returns:
- criteria of selecting module.
-
getScriptItems
-
addCommandListItemsElements
-
getScriptProcessor
-
setScriptProcessor
-
initialize
public void initialize()Description copied from interface:InitializableMethod will be called, when bean will be created, configured and ready to use.- Specified by:
initializein interfaceInitializable
-
process
Description copied from interface:ModuleProcess incoming stanza.- Specified by:
processin interfaceModule- Parameters:
packet- receivedstanza.- Throws:
ComponentException- if stanza can't be processed correctly. ComponentException is converted to error stanza and returned to stanza sender.
-
register
-
processScriptAdHoc
-