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

## Class AdHocCommansModule.AdHocCommansAsyncCallback

- java.lang.Object
- - tigase.jaxmpp.core.client.xmpp.modules.adhoc.AdHocCommansModule.AdHocCommansAsyncCallback

- All Implemented Interfaces:
    AsyncCallback
  Enclosing class:
    AdHocCommansModule

      public abstract static class AdHocCommansModule.AdHocCommansAsyncCallback
      extends Object
      implements AsyncCallback

  Callback to handle result of ad-hoc command.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AdHocCommansAsyncCallback()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Element` | `getCommand()` Return <command xmlns='http://jabber.org/protocol/commands' /> element of returned stanza.
    `protected IQ` | `getResponse()` Reutrns IQ stanza with response.
    `protected abstract void` | `onResponseReceived(String sessionid, String node, State status, JabberDataElement data)` Method called when response of ad-hoc command is received.
    `void` | `onSuccess(Stanza responseStanza)` Called when received response has type result.

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

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

    - ### Methods inherited from interface tigase.jaxmpp.core.client.AsyncCallback

      `onError, onTimeout`

- - ### Constructor Detail

    - #### AdHocCommansAsyncCallback

          public AdHocCommansAsyncCallback()

  - ### Method Detail

    - #### getCommand

          protected Element getCommand()

      Return <command xmlns='http://jabber.org/protocol/commands' /> element of returned stanza.
      Returns:
        return command element.

    - #### getResponse

          protected IQ getResponse()

      Reutrns IQ stanza with response.
      Returns:
        IQ stanza

    - #### onResponseReceived

          protected abstract void onResponseReceived(String sessionid,
                                                     String node,
                                                     State status,
                                                     JabberDataElement data)
                                              throws JaxmppException

      Method called when response of ad-hoc command is received.
      Parameters:
        `sessionid` - ID of session. May be `null`.
        `node` - node
        `status` - status of command execution
        `data` - Data Form
      Throws:
        `JaxmppException`

    - #### onSuccess

          public void onSuccess(Stanza responseStanza)
                         throws JaxmppException

      Called when received response has type result.
      Specified by:
        `onSuccess` in interface `AsyncCallback`
      Parameters:
        `responseStanza` - received stanza
      Throws:
        `JaxmppException`

Copyright © 2006–2022 Tigase. All rights reserved.