tigase.jaxmpp.core.client.xmpp.modules.adhoc

## Class AdHocCommansModule

- java.lang.Object
- - tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule<T>
  - - tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaExtendableModule<IQ>
    - - tigase.jaxmpp.core.client.xmpp.modules.AbstractIQModule
      - - tigase.jaxmpp.core.client.xmpp.modules.adhoc.AdHocCommansModule

- All Implemented Interfaces:
    ContextAware, ExtendableModule, InitializingModule, XmppModule

      public class AdHocCommansModule
      extends AbstractIQModule

  Module to handle ad-hoc commands.
  Author:
    bmalkow

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AdHocCommansModule.AdHocCommansAsyncCallback` Callback to handle result of ad-hoc command.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Criteria` | `CRIT`

    - ### Fields inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule

      `context, log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AdHocCommansModule()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beforeRegister()` Called just before registration module in XmppModulesManager .
    `void` | `execute(JID toJID, String node, Action action, JabberDataElement data, AsyncCallback asyncCallback)` Calls ad-hoc command on remote resource.
    `protected String[]` | `getCommandFeatures(SessionObject sessionObject, IQ requestStanza, String commandNodeName)`
    `protected DiscoveryModule.Identity` | `getCommandIdentity(SessionObject sessionObject, IQ requestStanza, String commandNodeName)`
    `Criteria` | `getCriteria()` Criteria
    `String[]` | `getFeatures()` Returns features what are implemented by Module.
    `protected DiscoveryModule.Identity` | `getModuleIdentity(SessionObject sessionObject, IQ requestStanza, String node)`
    `protected DiscoveryModule.Item[]` | `getModuleItems(SessionObject sessionObject, IQ requestStanza, String node)`
    `protected void` | `processGet(IQ element)` Method for processing stanza `<iq type='get'>`.
    `protected void` | `processSet(IQ element)` Method for processing stanza `<iq type='set'>`.
    `void` | `register(AdHocCommand command)` Registers new ad-hoc command.
    `void` | `unregister(AdHocCommand command)`

    - ### Methods inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractIQModule

      `process`

    - ### Methods inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaExtendableModule

      `addExtension, getExtensionChain, getFeaturesWithExtensions, removeExtension, write, write, write`

    - ### Methods inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule

      `afterRegister, beforeUnregister, fireEvent, getFirstChild, process, setContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CRIT

          public static final Criteria CRIT

  - ### Constructor Detail

    - #### AdHocCommansModule

          public AdHocCommansModule()

  - ### Method Detail

    - #### beforeRegister

          public void beforeRegister()

      Description copied from interface: `InitializingModule`
      Called just before registration module in XmppModulesManager . It is good place to check if module is initialized properly.
      Specified by:
        `beforeRegister` in interface `InitializingModule`
      Overrides:
        `beforeRegister` in class `AbstractStanzaModule<IQ>`

    - #### execute

          public void execute(JID toJID,
                              String node,
                              Action action,
                              JabberDataElement data,
                              AsyncCallback asyncCallback)
                       throws JaxmppException

      Calls ad-hoc command on remote resource.
      Parameters:
        `toJID` - remote ad-hoc command executor.
        `node` - node
        `action` - action
        `data` - Data Form
        `asyncCallback` - callback
      Throws:
        `JaxmppException`

    - #### getCommandFeatures

          protected String[] getCommandFeatures(SessionObject sessionObject,
                                                IQ requestStanza,
                                                String commandNodeName)
                                         throws JaxmppException

      Throws:
        `JaxmppException`

    - #### getCommandIdentity

          protected DiscoveryModule.Identity getCommandIdentity(SessionObject sessionObject,
                                                                IQ requestStanza,
                                                                String commandNodeName)
                                                         throws JaxmppException

      Throws:
        `JaxmppException`

    - #### getCriteria

          public Criteria getCriteria()

      Description copied from interface: `XmppModule`
      Criteria
      Returns:

    - #### getFeatures

          public String[] getFeatures()

      Description copied from interface: `XmppModule`

      Returns features what are implemented by Module.

      See Service Discovery Features

      Returns:
        array of features

    - #### getModuleIdentity

          protected DiscoveryModule.Identity getModuleIdentity(SessionObject sessionObject,
                                                               IQ requestStanza,
                                                               String node)

    - #### getModuleItems

          protected DiscoveryModule.Item[] getModuleItems(SessionObject sessionObject,
                                                          IQ requestStanza,
                                                          String node)
                                                   throws XMLException

      Throws:
        `XMLException`

    - #### processGet

          protected void processGet(IQ element)
                             throws XMPPException,
                                    XMLException,
                                    JaxmppException

      Description copied from class: `AbstractIQModule`
      Method for processing stanza `<iq type='get'>`.
      Specified by:
        `processGet` in class `AbstractIQModule`
      Parameters:
        `element` - incoming XMPP stanza
      Throws:
        `XMPPException`
        `XMLException`
        `JaxmppException`

    - #### processSet

          protected void processSet(IQ element)
                             throws XMPPException,
                                    XMLException,
                                    JaxmppException

      Description copied from class: `AbstractIQModule`
      Method for processing stanza `<iq type='set'>`.
      Specified by:
        `processSet` in class `AbstractIQModule`
      Parameters:
        `element` - incoming XMPP stanza
      Throws:
        `XMPPException`
        `XMLException`
        `JaxmppException`

    - #### register

          public void register(AdHocCommand command)

      Registers new ad-hoc command.
      Parameters:
        `command` - command to register

    - #### unregister

          public void unregister(AdHocCommand command)

Copyright © 2006–2022 Tigase. All rights reserved.