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

## Class AdHocRequest

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

-     public class AdHocRequest
      extends Object

  Class to provide request data to ad-hoc command.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AdHocRequest(Action action, String node, String sessionId, IQ iq, Map<String,Session> sessions)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Action` | `getAction()` Returns Action selected by client.
    `JabberDataElement` | `getForm()` Return Data Form sent by client in request.
    `IQ` | `getIq()` Returns IQ stanza constains command request.
    `String` | `getNode()` Returns called node of ad-hoc command.
    `Session` | `getSession()` Returns current Session.
    `Session` | `getSession(boolean createNew)` Returns current Session.
    `String` | `getSessionId()` Return session ID, or `null` if request hasn't Session.
    `void` | `setSessionId(String sessionId)`

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

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

- - ### Constructor Detail

    - #### AdHocRequest

          public AdHocRequest(Action action,
                              String node,
                              String sessionId,
                              IQ iq,
                              Map<String,Session> sessions)

  - ### Method Detail

    - #### getAction

          public Action getAction()

      Returns Action selected by client.
      Returns:
        Action

    - #### getForm

          public JabberDataElement getForm()

      Return Data Form sent by client in request.
      Returns:
        Data Form

    - #### getIq

          public IQ getIq()

      Returns IQ stanza constains command request.
      Returns:
        IQ stanza

    - #### getNode

          public String getNode()

      Returns called node of ad-hoc command.
      Returns:
        node name

    - #### getSession

          public Session getSession()

      Returns current Session. If there is no session related, creates one.
      Returns:
        Session

    - #### getSession

          public Session getSession(boolean createNew)

      Returns current Session. If there is no session related, creates one if `createNew` is `true`.
      Parameters:
        `createNew` - `true` to create new session.
      Returns:
        Session or `null` if `createNew` is `false` and request hasn't Session.

    - #### getSessionId

          public String getSessionId()

      Return session ID, or `null` if request hasn't Session.
      Returns:
        session ID if present.

    - #### setSessionId

          public void setSessionId(String sessionId)

Copyright © 2006–2023 Tigase. All rights reserved.