Package org.zkoss.zk.au.out

## Class AuEcho

- java.lang.Object
- - org.zkoss.zk.au.AuResponse
  - - org.zkoss.zk.au.out.AuEcho

-     public class AuEcho
      extends AuResponse

  A response to ask client to send a dummy request back to the server.

  It is used by `UiEngine` to solve a special case.

  There are two formats

  - data[0]: desktop Id
  - data[0]: the component's UUID
    data[1]: the event name
    data[2]: the extra data
  Since:
    3.0.0
  Author:
    tomyeh

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.zkoss.zk.au.AuResponse

      `AuResponse.JSONComponent, AuResponse.JSONDate`

  - ### Field Summary

    - ### Fields inherited from class org.zkoss.zk.au.AuResponse

      `_cmd, _data, SC_ACTIVATION_TIMEOUT, SC_OUT_OF_SEQUENCE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AuEcho()` | Constructs an echo response for each desktop in the same browser window
    `AuEcho​(Component comp, java.lang.String evtnm, java.lang.Object data)` | Constructs an echo response that will cause an event to fire when the client echoes back.
    `AuEcho​(Component comp, java.lang.String evtnm, java.lang.String data)` | Constructs an echo response that will cause an event to fire when the client echoes back.
    `AuEcho​(Desktop desktop)` | Constructs an echo response with the specified desktop.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static java.lang.Object` | `getData​(Component comp, java.lang.Object key)` | Retrieves the data associated with an echo event.
    `java.lang.String` | `getOverrideKey()` | Default: "zk.echo" if `AuResponse.getDepends()` is null (desktop level), null if `AuResponse.getDepends()` is not null (component level).

    - ### Methods inherited from class org.zkoss.zk.au.AuResponse

      `equals, getCommand, getDepends, getEncodedData, getRawData, hashCode, toString`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AuEcho

          public AuEcho​(Desktop desktop)

      Constructs an echo response with the specified desktop.
      Parameters:
        `desktop` - the desktop to send the echo response to. If null, the echo response is sent to each desktop in the same browser window.
      Since:
        3.0.0

    - #### AuEcho

          public AuEcho()

      Constructs an echo response for each desktop in the same browser window

    - #### AuEcho

          public AuEcho​(Component comp,
                        java.lang.String evtnm,
                        java.lang.String data)

      Constructs an echo response that will cause an event to fire when the client echoes back.

      It is the same as `AuEcho(comp, evtnm, (Object)data)`.

      Since:
        3.0.2

    - #### AuEcho

          public AuEcho​(Component comp,
                        java.lang.String evtnm,
                        java.lang.Object data)

      Constructs an echo response that will cause an event to fire when the client echoes back.
      Parameters:
        `comp` - the component to echo the event to (never null).
        `evtnm` - the event name
        `data` - the extra information, or null if not available
      Since:
        5.0.4

  - ### Method Detail

    - #### getData

          public static java.lang.Object getData​(Component comp,
                                                 java.lang.Object key)

      Retrieves the data associated with an echo event. Notice that the data will be removed, so the next call always returns null.
      Since:
        5.0.4

    - #### getOverrideKey

          public final java.lang.String getOverrideKey()

      Default: "zk.echo" if `AuResponse.getDepends()` is null (desktop level), null if `AuResponse.getDepends()` is not null (component level).
      Overrides:
        `getOverrideKey` in class `AuResponse`
      Since:
        5.0.2