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

## Class AdHocResponse

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

-     public class AdHocResponse
      extends Object

  Class for helping sending response to the client.
  Author:
    bmalkow

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AdHocResponse(PacketWriter writer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<Action>` | `getAvailableActions()` Returns collection of available action.
    `Action` | `getDefaultAction()` Returns default action
    `JabberDataElement` | `getForm()` Return response Data Form.
    `State` | `getState()` Return state of execution.
    `PacketWriter` | `getWriter()` Return writer.
    `void` | `setDefaultAction(Action defaultAction)` Set default action.
    `void` | `setForm(JabberDataElement form)` Set reponse data form.
    `void` | `setState(State state)` Set execution state.

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

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

- - ### Constructor Detail

    - #### AdHocResponse

          public AdHocResponse(PacketWriter writer)

  - ### Method Detail

    - #### getAvailableActions

          public Set<Action> getAvailableActions()

      Returns collection of available action. All actions should be added to this collection.
      Returns:
        collection of available actions.

    - #### getDefaultAction

          public Action getDefaultAction()

      Returns default action
      Returns:
        Action `null` is no action has no been set.

    - #### getForm

          public JabberDataElement getForm()

      Return response Data Form.
      Returns:
        Data Form. `null` is no data has no been set.

    - #### getState

          public State getState()

      Return state of execution.
      Returns:
        state. `null` is no state has no been set.

    - #### getWriter

          public PacketWriter getWriter()

      Return writer.
      Returns:
        writer

    - #### setDefaultAction

          public void setDefaultAction(Action defaultAction)

      Set default action. It also adds default action to available actions.
      Parameters:
        `defaultAction` - Action

    - #### setForm

          public void setForm(JabberDataElement form)

      Set reponse data form.
      Parameters:
        `form` - Data Form

    - #### setState

          public void setState(State state)

      Set execution state.
      Parameters:
        `state` - State

Copyright © 2006–2016 Tigase. All rights reserved.