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 AdHocCommandManager
protected static final Criteria
static final String
static final String
Fields inherited from class tigase.component.modules.AbstractModule
eventBus, log, writer
Fields inherited from interface tigase.component.modules.Module
EMPTY_FEATURES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
getCommandListItems
(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) void
Method will be called, when bean will be created, configured and ready to use.void
Process incoming stanza.protected void
processScriptAdHoc
(Packet packet) void
register
(AdHocCommand command) void
setCommandsManager
(AdHocCommandManager commandsManager) void
setScriptProcessor
(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:Module
Returns XMPP features offered by module. Features will be returned by Service Discovery.- Specified by:
getFeatures
in interfaceModule
- Returns:
- array of features or
null
.
-
getModuleCriteria
Description copied from interface:Module
Returns critera used by Component to select module to handle incoming stanza.- Specified by:
getModuleCriteria
in interfaceModule
- Returns:
- criteria of selecting module.
-
getScriptItems
-
addCommandListItemsElements
-
getScriptProcessor
-
setScriptProcessor
-
initialize
public void initialize()Description copied from interface:Initializable
Method will be called, when bean will be created, configured and ready to use.- Specified by:
initialize
in interfaceInitializable
-
process
Description copied from interface:Module
Process incoming stanza.- Specified by:
process
in 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
-